aspose file tools*
The moose likes Struts and the fly likes URL encoding in Struts is not working! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "URL encoding in Struts is not working!" Watch "URL encoding in Struts is not working!" New topic
Author

URL encoding in Struts is not working!

Geoffrey Falk
Ranch Hand

Joined: Aug 17, 2001
Posts: 171
    
    1
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


Sun Certified Programmer for the Java 2 Platform
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
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...


"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URL encoding in Struts is not working!