Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 session management using URL rewriting

 
Don Blodgett
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please make sure to ask Struts questions in the Struts forum; I have moved this post there for you.
 
Don Blodgett
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have figured out the problem I was having. It all came down to a single character typo in my javascript
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic