Maintain Session using URL Rewriting

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 see an example


How to maintain Session?


URL rewriting

Once you click on the URL rewriting link class will append p3lang in the URL. See below code of

This rewrite.jsp page is the response page. This page will display the value that we have sent in the URL.


Index page
URL Rewriting
Rewritten URL
URL Rewriting 1