Solved

JSP Session Handling

Posted on 2006-07-19
10
217 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Set up Wildfly 10 8 419
parse example 13 95
lessBy10  challenge 15 95
doubleChar java challenge 7 119
Businesses who process credit card payments have to adhere to PCI Compliance standards. Here’s why that’s important.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

789 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