Spring View Helper
In your application, once the service have handled the request and returned the results desired, you will need to render the results in a useful manner to the user. This is the purpose of viewing technology such as JavaServer Pages (JSP). Although you can use JSPs in Spring there are a number of other viewing technologies that Spring support. In this tip, I will outline some of the other view technologies that are available.
When Spring is looking to render some content, the DispatcherServlet
In my previous tips we have gone through calling the appropriate RESTful methods, returning the results, and the initial parts of the determining the view involving determining the appropriate media type and looked at factors that could influence that decision. In the last tip on RESTful services I will show how the appropriate view is selected.
Given that our previous post focused on the ContentNegotiatingViewResolver, one would expect that this view resolver directly resolves the
Updated 11-30-2011 at 01:52 PM by Spring Framework
In my previous tips, we looked at the components Spring uses to determine the appropriate media type for the results returned. We know that the ContentNegotiatingViewResolver is used to determine what the appropriate media type is for the results. I will discuss the first part of the strategy used for making this determination. This involves determining the requested media type(s).
When the controllerís handler method finishes, and a logical view name is usually returned. The DispatcherServlet
Updated 11-30-2011 at 01:44 PM by Spring Framework
Following on from my previous tip, I will now define the page view from our previous tip. Using Tiles properly, the home page is composed of several distinct pieces. The main_template.jsp file describes the common layout for all pages in the Springexample application, while home.jsp displays the main content for the home page. Plus, carForm.jsp and login.jsp provide additional common elements.
The home.jsp is where the home page request finishes its journey. It picks up the list of Cars
When you are looking to create the web front-end to your application, anyone with exposure to design patterns would apply the MVC pattern for this aspect of the application. There are a number of ways to do this, in Spring Framework, the means of accomplishing this is via an application controller and page controllers combined with a gateway servlet. This design resolves three important concerns of request processing: Request interceptionInvoking business components from page controllersResolving