Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 session management using URL rewriting

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic