Solved

JSP Session Handling

Posted on 2006-07-19
10
215 Views
Last Modified: 2010-04-01
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
0
Comment
Question by:CIPL-Senthil
  • 4
  • 3
10 Comments
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 17144603
  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
0
 
LVL 5

Expert Comment

by:jpolin1
ID: 17145665
I think your really looking to determine if a client supports cookies, if they don't then you would want to use url rewriting.
0
 

Author Comment

by:CIPL-Senthil
ID: 17153138
Yeah! If there is no support for cookies, I would like to switch to URL rewriting. Can anybody provide some information about this.
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 17153186
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:CIPL-Senthil
ID: 17165456
Hi,

Can you provide me the code to check cookies are supported, if not how to URL Rewrite?
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 250 total points
ID: 17193929

Take a look at this example :
http://www.java2s.com/Code/Java/Servlets/Usecookietosavesessiondata.htm

Regards,
  Tomas Helgi
0
 

Author Comment

by:CIPL-Senthil
ID: 17206561
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
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 17322148

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

Regards,
  Tomas Helgi
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need to view directory list in apache/tomcat 9 109
spring example non maven 4 82
countXY challenge 28 146
listing all functions in JavaScript 19 179
In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
With the rapid rise in mobile usage, mobile devices are here to stay and have become an integral part of doing business. Here are 9 great apps for your BYOD environment.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now