• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Maintaining Session using Rewriting URL  RSS feed

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
With the cookies disabled we have no optin other than rely on URL rewriting. but the problem is if i am requesting for a resource from a html Form, how can i maintain the session.

Will i need to rewriting the action say encodeURL(/action/sample.do); and place it as the action attribute for the form tag.

Help me out.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple answer - yes, you'll need to encode the URL, because if you don't you'll lose track of the session.

I'm not sure in what form you're producing the html form - i.e. whether from a servlet or a jsp. If you're generating from a servlet, then yes encodeUrl would be appropriate. If on the other hand you're using a jsp, you could use the url tag from the core library which takes care of URL rewriting automatically:



then write out the url on the action with:


[ August 03, 2006: Message edited by: Daniel Dalton ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!