PDA

View Full Version : Spring MVC Multiple actions from JSP


kbc_20
Dec 11th, 2006, 09:48 AM
Hi All,

This is my first post in this forum and I'm new to Spring framework.

I have a framework question:
If I have multiple actions from my JSP, to cater these requests do I need to write different controllers for each action or can I handle multiple requests using the same Controller class.

If I can use a single class also please lemme know how will my controller class know which action request has come.

Thanks and Regards,
Bharath...
Edit/Delete Message

Marten Deinum
Dec 11th, 2006, 10:02 AM
You can have multiple submit buttons on a form, only the submit button pressed will be included in the GET/POST. In your onSubmit you can check what to do.

Or create a MultiActionController, you can define on which action to execute which method (check the referenceguide for more info).