Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

enforcing URL rewriting in Tomcat

 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can enforce URL rewriting in tomcat even if cookies are enabled?
When i set the cookies off in IE, URL rewriting works fine and each URL that i rewrite contains jsessionId. But if i set the cookies on, it is lost and URLs are not re-written and cookies are used for session maintence. Can I enforce this?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want URL rewriting when cookies are enabled? :roll:
 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is because , the sessions of two users are getting mixed. Here is the post in which i had explained my problem...

Hi all,
We have developed an web application that is accessed by multiple users (say 1000) concurrently. It is developed using struts framework and entire session tracking is done using HttpSession object. Now the problem is -
- the application is opened in two sepearte browser instances on the same machine.
- Two different userIds are used to log in.
- After continuously working within two application, some times the user data is inter-mixed; i.e. values specific to say user1 starts getting displayed for user2 or vice-a-versa.
This behavior is random. And it can never be reproduced on internet explorer version 5.5. Only when version 6.0 is used, things start getting mixed. There are no cookies used by the application to store user speciifc data? only Httpsession object is used for user's session tracking. So how does these seperate sessions get intermixed? or is the problem with the browser version? Does struts framework mention some cookies for its own purpose and those cookies are causing problem?
Have anybody encountered such problem?
Can anybody please help? Any help would be highly appreciated.

Due to above explained problem, we started searching other alternatives for session management.
Can you please help me further?
-Rashmi
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There shouldn't be a browser problem.
I hope your client browser cookie settings are enabled.

- the application is opened in two sepearte browser instances on the same machine.

How are you opening the two seperate browser instances?
Are you using :
Ctrl-N OR File->New->Window
by any chance while testing?
 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Varun,
I am not opening the instance with 'CTRL + N'. It is a totally new instance. So the session should not be mixed up with new instances of browser. Thats why i am exploring an option of URL rewriting.
However, I got the way to enforce URL rewriting in tomcat. The server.xml in conf directory needs to be modified with following tag -
<DefaultContext cookies="false" />
This enforces the application to use URL rewriting instaed of session even when cookies are enabled in IE options.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Jeffrey Spaulding
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How by all means do you manage to get 2 _really_ separate instances of IE on one machine ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic