I have the following URL mapping in controller
@RequestMapping(value = "/additem.htm", method = RequestMethod.GET)
@RequestMapping(value = "/additem/fileupload.htm", method = RequestMethod.POST)
I click on page with href="additem.htm" and it goes to the controller with value="/additem.htm" above. I fill up form in that and submit the form.
The form gets posted to action="additem/fileupload.htm", which goes to the controller with value="/additem/fileupload.htm". Once i complete this fileupload controller and returns a jsp the browser urls turns to "http://localhost:8080/Dream/additem/fileupload.htm".
The problem is, when I again click on the first link with href="additem.htm", it is trying to search for controller with mapping like "additem/additem.htm".
Even when i hover over the link the browser is showing the url as http://localhost:8080/Dream/additem/additem.htm and it throws an error. How do i resolve this URL issue?