File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes session in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "session in servlet" Watch "session in servlet" New topic

session in servlet

jak lodhi

Joined: May 16, 2006
Posts: 6
Dear friends ,
tell me when we open mail ID (inbox) , if we copy addressbar string and paste
into another browser's address bar then it gives invalid session. why it does not open same page again.

i want to implement into my web application how should i implement ?

tell me how it happen ?
dema rogatkin
Ranch Hand

Joined: Oct 09, 2002
Posts: 294
It's expected behavior when a session is cookie based. Cookie it's something hidden for you browser sends to server and servlet container uses it to maintain session. If you would like to keep session copying URL from address bar of one browser to an address bar of other browser, then you can try to use session based on URL overwrite mechanism. Check your servlet container doc how to enable it. In this case URL will include session token and you can continue work on other instance of a browser.

Tough in space?, <a href="" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="" target="_blank" rel="nofollow">Check it here.</a><br /><a href="" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
I agree. Here's the link:
subject: session in servlet
jQuery in Action, 3rd edition