2

I am trying create a simple "login" / "logout" page.

The server side is running Tomcat.

By following This Link, I successfully utilise the internal authentication mechanism of Tomcat to let user login.

But how can I implement the "logout" button? What should I do if the user click the "logout" button? How can I tell Tomcat that user wants to logout?

1 Answer 1

2

Logout Link/Button must do following things:

  1. invalidate() the session.
  2. Clear up the cookies (if any).
  3. Reset the bean object (if any).
  4. Get redirected to custom logout message page or home page of application.

Also if any database value is related to user's login/logout then set it to appropriate value.

Below are some answers that may help you further:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.