I have a Spring MVC form in jsp and I am having trouble getting the controller method invoked.
Can someone please explain to me the mechanism whereby Spring MVC performs controller method execution?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using Spring 3 and annotations (recommended way of implementing controllers), the @RequestMapping(value=”exampleMapping.do”) specifies the method that will be executed. Here is an example:
So in this case, if your form submit target is exampleMapping.do, the method anExample will execute and return someView (which will resolve to your view folder containing a jsp named someView.jsp if you have your view resolver configured correctly).