PDA

View Full Version : Which controller has both HttpServlet request and form submission handling


anjanks1981
Jun 5th, 2008, 11:56 AM
I am new to Spring and I am aware that you have Abstract Controller, AbstractCommand Controller to get HttpServlet request and Object as parameters. However, SimpleFormController doesn't have HttpServletRequest.

Can I have form submissions handled by a controller that has both request and Object parameters with parameter binding feature of SImpleFormController

vincent_the_cat
Jun 5th, 2008, 01:48 PM
What's wrong with SimpleFormController's onSubmit() method, which have the following signature:

protected ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response,
Object command,
BindException errors)
throws Exception

It has everything you're asking for. What more do you need?

//Vince :o

anjanks1981
Jun 5th, 2008, 04:31 PM
Thank You so much Vince:)