This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Is there any way to track session without session object,Cookies,Hidden fields and URL rewriting? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is there any way to track session without session object,Cookies,Hidden fields and URL rewriting?" Watch "Is there any way to track session without session object,Cookies,Hidden fields and URL rewriting?" New topic
Author

Is there any way to track session without session object,Cookies,Hidden fields and URL rewriting?

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576
Is there any way to track session without session object,Cookies,Hidden fields and URL rewriting?
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Not that I am aware of. If it does exist, it probably will not be reliable.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Why?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576
I want to track the session but that stuff should not depend on any server implementation such as web sphere ,web logic ,jboss.so my session tacking is free from any particular server implementation.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Session tracking is part of the servlet specification so your reasoning makes no sense. What do think is container-specific about it?
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 597

I don't think there is any other way.
Using Hidden Fields or URL re-writing would not only make it server independent but also programming language independent.
Also sessions have to be supported by all containers so it really is a container-independent - only problem that could occur using the httpSession object is if the user has turned of cookies.

Hope this helps!


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Alok Kushwah
Ranch Hand

Joined: Jul 10, 2007
Posts: 31
jacob deiter wrote:I want to track the session but that stuff should not depend on any server implementation such as web sphere ,web logic ,jboss.so my session tacking is free from any particular server implementation.


This reasoning is illogical. To make your program implementation independent, use J2EE spec. J2EE is designed to make application implementation/provider independent. Just like JDBC programming in J2SE. JDBC client use standard api to connect to DB. You can change DB without chaning your code (If you did it correctly). So to make long story short use Seesion object available in Servlet container environemnt to make your application session aware. Don't woryy about how servlet container make it work and track the session. Container provide this service for free, use it. Don't put your effort to re-envent the wheel. Conatiner tries different strategy to keep track of session, you already mentioned all. For your information HTTP protocal is statless, lots of effort has gone to make the web application session aware. J2EE spec put this burdon on container provider, so application writer need not to worry about.

So why you want to invent an new way to track the session?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Is there any way to track session without session object,Cookies,Hidden fields and URL rewriting?
 
Similar Threads
Session Problem
Passing a session from a servlet to a JSP
session tracking
Session Management
Difference between Cookies and Session in servlets