Can I use HTML as front end with Spring MVC -
I want to create an app using Spring MVC with the front end as HTML, CSS, and Jquery . I want to know that this is possible. Spring is the model of MVC which can be accessed in the UI to access server side data.
My Controllers have the following
@Override Protected ModelAndView handleRequestInternal (HttpServletRequest request, HTTPServlet Response Response) throws exceptions {ModelAdviewView = New ModelInDueView ("HelloWorld Page") ; Model.addObject ("msg", "Hello World"); Return model; } My HTML code will be as follows
& lt; html xmlns = "http://www.w3.org/1999/xhtml" xmlns: c = "http://java.sun.com/jstl/core"> & Lt; Body & gt; & Lt; C: out value = "$ {msg}" /> & Lt; / Body & gt; & Lt; / Html & gt;
Yes you can.
- Personal Spring Projects and Indepath Tutorials
You can also take advantage of other template engines such as Velocity and Thiamelph to take advantage of better and more fluid HTML5 pages.
Personally, I'm Thelemam Spring 3 MVCL + Timeloft Tutorial -
Comments
Post a Comment