aspose file tools*
The moose likes Tomcat and the fly likes How can I turn off URL-Rewriting of tomcat ? Thank you! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How can I turn off URL-Rewriting of tomcat ? Thank you!" Watch "How can I turn off URL-Rewriting of tomcat ? Thank you!" New topic
Author

How can I turn off URL-Rewriting of tomcat ? Thank you!

Yajun Zhan
Greenhorn

Joined: Dec 20, 2003
Posts: 13
How can I turn off URL-Rewriting of tomcat ? Thank you!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12821
    
    5
URL rewriting does not occur automatically, it must be specifically programmed into an application. Look for calls to encodeURL in the source code.
Bill
Yajun Zhan
Greenhorn

Joined: Dec 20, 2003
Posts: 13
I hava code my program with every URL by encodeURL(xxx) .

now I want to turn off the effect of encodeURL,and not want to rewrite my code .

In other app server , such as resin , I can do this by
<session-config>
<session-max>4096</session-max>
<session-timeout>3000</session-timeout>
<enable-cookies>true</enable-cookies>
<enable-url-rewriting>false</enable-url-rewriting>
</session-config>

But I can not find this in tomcat.

Thank you for you reply
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12821
    
    5
Looking through the servlet APIs for 2.3 and 2.4 I don't see any element like that in the web.xml DTD under <session-config> so the resin usage is non-standard.
According to my reading of the Tomcat docs - encodeURL should return a unchanged String if the client has cookies enabled. What exactly do you observe?
Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can I turn off URL-Rewriting of tomcat ? Thank you!