1

On session logout the page should redirect to login.jsp.

It is redirecting to login.jsp if I use request.getRequestDispatcher("../login.jsp").forward(request, response) but the url is not changing.

what should I do so that it go and change the url too and redirect me to login page?

Thanks

jmj
  • 237,923
  • 42
  • 401
  • 438
Sinha
  • 773
  • 2
  • 16
  • 34

1 Answers1

3

You need to use

response.sendRedirect("/yourcontextPath/login.jsp);

See

Community
  • 1
  • 1
jmj
  • 237,923
  • 42
  • 401
  • 438