In this method, we rewrite the URL and append the information to the URL to keep the track of the values. URL Rewriting can be used to maintain the session. We can maintain session using URL rewriting. There are several methods to maintain session between client and server, see all types of method here Lets […]
We can maintain session using User Authorization, the most common method. Maintain Session using User Authorization is the second method in the series of http://p3lang.com/2014/06/playing-with-session-in-java/ post. User Authorization is the most common way to maintain session between client and server. A user has to sign-in into the application using their credentials. Once the user submits […]
Session can be maintained using browser cookies. Here in this post, we will see how to Maintain Session using Cookies in JSP servlet. It is very simple to maintain session using cookies, you just need to create an object of Cookie Class then call addCookie() method on response. Code Snippet:
Cookie user_defined_cookie = new Cookie("user_defied_cookie",
"You clicked on 'cookies' link.");
// Add cookie in the response header.
See full example […]