Hi
I want to link a
jsp page to a controller, but it doesent work. I�m greatful for all the help I can get.
Here is the link code from the jsp:
<a href = "Logout"> Logout </a>
Here is the code from the controller:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
String loggedOut = "/pages/loggedout_text.jsp";
RequestDispatcher view = request.getRequestDispatcher(loggedOut);
view.forward(request, response);
System.out.println("Hej");
session.invalidate();
}
Here is the code from from the loggedout_text.jsp:
Error
<p />
You are logged out.