This might be an obvious question. But am not able to figure it out so far.
In my Spring application, I make a GET request to the following url
http://www.example.com/firstpage
This request goes to the front controller where I have a request mapping as below:
@RequestMapping(value = "/firstpage")
public String handlerMethod(HttpServletRequest request, HttpSession session)
throws CustomException {
...
return "secondpage";
}
This "secondpage" corresponds to secondpage.jsp and its contents are correctly displayed. But the problem is the browser URL still displays
http://www.example.com/firstpage
Why is this happening? Any suggestions as to how to make the browser URL change? Also does Spring have any default support for encoding URL ?