Sunday, June 29, 2008

Previous


Controllers:

Controllers are classes that interpret user input data or handles requests and send a model along with the view to the client after doing some customized processing. Every controller class actually returns a ModelAndView type of object. Controllers even can forward or redirect the request to a URL.
Among various types of controllers we have used:

• Controller – Default and the simplest form of controllers, when no form data is required to be handled at all

• SimpleFormController – For handling a single request by a controller

• MultiActionController – For handling different requests by a single controller
web.xml:

Whatever request comes from the client side first reaches to web.xml. This file was kept in WEB-INF. This file was mapped with the Spring Dispatcher Servlet named as test-servlet.xml as in our project (You can change the first part “test”):




Even you can set the context configuration inside test-servlet.xml as:



Next is how the web.xml will handle different types of request. This can be mapped as:





Next

0 comments: