Skip to content

After a successfull validation Spring does not call the onSubmit method with signature of (request, response,object, bindexception) [SPR-692] #5420

Closed
@spring-projects-issues

Description

@spring-projects-issues

Venkatt Guhesan opened SPR-692 and commented

I have a simple application where the following scenerio:

  • LoginController extends SimpleFormController
  • LoginValidator implements Validator

Within LoginController I override the following method:

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


on proper validation with no errors, I would expect the app to call the "onSubmit" method with the defined signature but it does not. If on the other hand I override, the following method:

protected ModelAndView onSubmit(Object command)
throws Exception


it calls the "onSubmit" method properly but I need to access the request scope to set a variable in the session.

Why does it not work when I implement the onSubmit(request,response,command,errors)? I have tried both Spring - 1.1.3 and 1.1.4 JARs.

PS: There is only one onSubmit method in the class. I have verified to make sure there were nother onSubmit methods...

Thanks

Venkatt Guhesan


Affects: 1.1.3, 1.1.4

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions