Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URL encoding in Struts is not working!

 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Struts-1.0.2-based web application running under Tomcat 4.1.x and Apache 1.3.x.
I am using the Struts <html:link> tags for all links. Unfortunately, session management only works with cookies enabled. If the user has cookies turned off, it doesn't automatically revert to URL encoding. The result is that the user cannot access the site properly.
How do I make Struts detect cookie support and use the appropriate method for session management? It should use cookies if they are supported; otherwise it should revert to use encodeURL().
TIA
Geoffrey
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This actually depends on your app sever setting. If URL rewriting is enabled, it will rewrite the URL. If rewriting is not enabled, it will not rewrite the URL. At least it works in WebSphere...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic