Link to home
Start Free TrialLog in
Avatar of CIPL-Senthil
CIPL-Senthil

asked on

JSP Session Handling

Hi Experts,

I would like to check whether a client machine is supporting sessions or not. If not, what would be the best way to handle sessions in JSP? I further need to know, how i can maintain sessions using URL Rewriting.

Awaiting for your comments.

Regards,
Vijay T. Prabakar
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

  Hi!

Take a look at this example http://www.java2s.com/Code/Java/JSP/Sessionsdisabled.htm and the related examples.
Hope it helps.

Regards,
  Tomas Helgi
Avatar of jpolin1
jpolin1

I think your really looking to determine if a client supports cookies, if they don't then you would want to use url rewriting.
Avatar of CIPL-Senthil

ASKER

Yeah! If there is no support for cookies, I would like to switch to URL rewriting. Can anybody provide some information about this.
Hi,

Can you provide me the code to check cookies are supported, if not how to URL Rewrite?
ASKER CERTIFIED SOLUTION
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

I would like to have an web application which automatically enables URL Rewritting whenever cookies are not supported on the client machine. I saw some articles on URL Rewritting which speaks about adding the session id to the URL.

I would like to know, is it possible to track the other session variables just by having the session id in the URL or would I have to add every session variable along with the URL.

Please advice.

Regards
Vijay T. Prabakar

You would have to add every session variable to the url if you can't write a cookie.

Regards,
  Tomas Helgi