aspose file tools*
The moose likes Servlets and the fly likes Session Overriding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session Overriding" Watch "Session Overriding" New topic
Author

Session Overriding

Dinesh Mahi
Greenhorn

Joined: Dec 01, 2003
Posts: 4
I am getting a session overriding problem when I open my application clicking on a link from a word document. I am using WebShere5.1 server.

1) I have copied the link for my application in a word document
2) I have clicked on the link, login page is displayed and I have logged into the application.
3) I have clicked again on the link (in word document), login page displayed and I have logged into the application with same user id and password. (Our application allows multiple logins with same user id and password) Now previous session is getting over ridden by the new session.

Please can anybody advise what should I do to resolve this problem.

Please revert if you need any further information

Thanks in advance

Cheers,
Mahi
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
How do you know that previous one has been over-ridden?
Dinesh Mahi
Greenhorn

Joined: Dec 01, 2003
Posts: 4
Sorry to use the word overriding. Instead I can say it is shared by both the windows. And I dont think this is problem with browser (I am using IE 6.0), because when I type the url in browser I am not facing this problem. The problem is only when I click on the link in a word document.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
Think about how the servlet identifies the session.





Right! It uses a cookie provided by the browser.



Does WORD have the same cookie? (Does WORD even know about cookies?)
Dinesh Mahi
Greenhorn

Joined: Dec 01, 2003
Posts: 4
William,

Can you explain in some more detail please.

I dont think word will use a cookie. I am not able to understand why the same session is being used. And please let me know how to resolve this issue.

Thanks.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

When you click on the link in the Word document, does it bring the login page up in browser?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
the question is how the session is identified.

to my best knowledge, this can be done by one out of two options:

(1) cookie based
(2) url-rewriting (like amazon does)

if you use (1), i would expect that a link from word / whereever starts a new session. but honestly, i have no clue if some weired browser functionality comes into the game.

if you use (2), a link would probably catch up with the existing session, unless it's time-out or so.

i would investigate in this direction,

hope it helps,
jan
Dinesh Mahi
Greenhorn

Joined: Dec 01, 2003
Posts: 4
When you click on the link in the Word document, does it bring the login page up in browser?
Yes. It brings login page up in the browser.

Ben,

If I use url rewriting, do I need to replace the code only in login module or does it need to be changed through out hte application (where ever I used hyperlink)

Thanks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session Overriding