Solved

JSP Session Handling

Posted on 2006-07-19
10
216 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 17153186
0
 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exception creating bean of class 5 180
library class in java 1 92
issue with pdf generation 2 88
'exit' is not valid keyword in java 14 152
When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

774 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