request.getSession().invalidate() method. Thus in a simple servlet following code will be the code for logout: public void doGet(HttpServletRequest request, HttpServletResponse response) throws
     ServletException, IOException {
 request.getSession().invalidate();
 response.sendRedirect("/sampleapplication/index.jsp");
}
Code language: Java (java)<form method="post" action="ibm_security_logout" name="logoutForm">
 <input type="hidden" name="logoutExitPage" VALUE="/sampleapplication/index.jsp" >
 Click here to logout:
 <input type="submit" name="logout" value="Logout">
</form>
Code language: HTML, XML (xml)Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…
Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…
Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…
1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…
GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…
1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…
View Comments
I used the servlet code for LogOut utility. After logging our I am redirecting the browser to Log-in page. And on login page when user clicks on the back button, my application goes to the previous page from where user has executed logout.
Kindly help.
Thank you.