I use Spring because I have user.jsp
user.jsp has three separate branches: 1. Personal, 2. Educational, 3. Awards. Each section has different .jsp forms that I created.
Now I am going to include these three forms in user.jsp and display the model using one controller.
Here is my controller class code:
@Controller @RequestMapping(value="profile") public class UserProfileController { @RequestMapping(value="user", method=RequestMethod.GET) public String user(Model model) throws Exception { model.addAttribute("profile", new PersonalForm()); return "profile/user"; }
And this is my Personal.jsp file (all other files are the same, but the names are different)
So how to include these three jsp in user.jsp ? I'm actually trying, but Eclipse shows an error. The following is the error code in user.jsp :
The fragment "profile / professional.jsp" was not found on the expected path / EClass / WebContent / WEB -INF / pages / profile / profile / professional.jsp
So please help me how to enable and how to work with one controller?
source share