From the course: Java EE: Servlets and JavaServer Pages (JSP)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

URL rewriting for session management

URL rewriting for session management

From the course: Java EE: Servlets and JavaServer Pages (JSP)

Start my 1-month free trial

URL rewriting for session management

- [Instructor] Now let us understand the second way of exchanging the session id between the client and the server, which is URL rewriting. Now, this is a fallback option and it is going to kick in only when the cookies are disabled in your browser software. Generally, today in all the websites, cookies have to be enabled because there are loads of websites running on the internet, which work with cookies, so you really can't disable them today. Nevertheless, if they are disabled, we need to have another way of exchanging the session ID between the client and the server. Let's understand what it is. When you talk about URL rewriting, as the name suggests, you are rewriting the URL, and when we say rewriting, you're basically appending some information at the end of the URL. That information is nothing but the session ID. So let's understand this. Let's say this is your basic URL, which you have attached to your hyperlink or maybe your form action element. Anything like that on your…

Contents