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 Struts and the fly likes Struts 2 session management using 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 » Frameworks » Struts
Bookmark "Struts 2 session management using URL rewriting" Watch "Struts 2 session management using URL rewriting" New topic
Author

Struts 2 session management using URL rewriting

Don Blodgett
Ranch Hand

Joined: Jan 09, 2006
Posts: 61
I need to implement URL rewriting in Struts 2. The requirement is that cookies be disabled and so this method is required. I am at the point where I am able to get the session Id and I can store that as a hidden field within a form or append it to a URL. When I go to submit that value the session is not being restored in the action and a new session is created. If I enable cookies it works just fine, unfortunately that is an unacceptable solution.

I have tried to create links as the following as these are examples I have seen elsewhere, none of them work:

/foo.jsp?JSESSIONID=someSessionId
/foo.jsp?jsessionid=someSessionId
/foo.jsp;JSESSIONID=someSessionId
/foo.jsp;jsessionid=someSessionId

I look forward to any suggestions, thanks in advance.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please make sure to ask Struts questions in the Struts forum; I have moved this post there for you.
Don Blodgett
Ranch Hand

Joined: Jan 09, 2006
Posts: 61
My apologies for posting in the wrong forum, I thought I was in the Struts forum; I should pay more attention to details .

Anyway, is there anyone that can help me out with this?
Don Blodgett
Ranch Hand

Joined: Jan 09, 2006
Posts: 61
I have figured out the problem I was having. It all came down to a single character typo in my javascript
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 session management using URL rewriting
 
Similar Threads
URL Rewriting
64 bit jsessionid in Struts
disable jsession id
Enthruware url rewriting question
session management -cookie disabled