wood burning stoves 2.0*
The moose likes Web Services and the fly likes UrlRewrite Rule works on tomcat 4.1.34 but fails on tomcat 5.0.28 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "UrlRewrite Rule works on tomcat 4.1.34 but fails on tomcat 5.0.28" Watch "UrlRewrite Rule works on tomcat 4.1.34 but fails on tomcat 5.0.28" New topic
Author

UrlRewrite Rule works on tomcat 4.1.34 but fails on tomcat 5.0.28

ying lam
Ranch Hand

Joined: May 17, 2004
Posts: 85
I would like to do the following:
rewrite from
http://localhost:8080/testApp?arg1=abc&arg2=def
to
http://localhost:8080/testApp/index.jsp?arg1=abc&arg=def

So i have the following rule in my urlrewrite.xml (under WEB-INF
directory)
<rule>
<from>^\?(deviceCode=.*)$</from>
<to type="redirect">%{context-path}/index.jsp?$1</to>
</rule>

Everything works in tomcat 4.1.34. But when I deploy the same webapp
in tomcat 5.0.28, url rewrite does not work.
When I enter 'http://localhost:8080/testApp?arg1=abc&arg2=def', it goes
to
http://localhost:8080/testApp/?arg1=abc&arg2=def

Can you please tell me how can I achieve the same thing in Tomcat
5.0.28?

Thank you.
 
Consider Paul's rocket mass heater.
 
subject: UrlRewrite Rule works on tomcat 4.1.34 but fails on tomcat 5.0.28
 
Similar Threads
Web Application Root
How can I map the root of servlet and send down a static page
cannot login in tomcat adim
tomcat problem
How to configure JBoss with Tomcat