i'm writing a web application with Java (with spring/mvc). To navigate from page to page i use this:
function toPage() {
window.location.href = 'profilo.htm';
return false;
}
triggered by a button. This function call a servlet and the servlet do this:
public class HomeServlet extends AbstractController {
@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
ModelAndView model = new ModelAndView("profilo");
return model;
}
}
And after this servlet i'm in profilo.jsp.
Now if i press the back button of my browser i get the alert of the module/post submission.
What i can do to prevent this?
Thanks