Tomcat
URL rewriting instructions for Tomcat
Last updated
Was this helpful?
URL rewriting instructions for Tomcat
Last updated
Was this helpful?
Tomcat 8 can be configured using RewriteValve
. See for examples.
UrlRewriteFilter (commonly referred to as Tuckey) is a Java web filter for compliant web application servers such as Tomcat, Jetty, Resin and JBoss. Unfortunately UrlRewriteFilter depends on XML with its extremely strict syntax.
First follow the ().
Append the servlet-mapping markup to the end of the <filter mapping>
element in your WEB-INF/web.xml
Add the pretty urls rule markup to the <urlrewrite>
element to your WEB-INF/urlrewrite.xml
configuration.
Restart the web application server.
Servlet-Mapping markup
Example markup with UrlRewriteFilter and Wheels pretty URLs for WEB-INF/web.xml
.
Pretty URLs Rule markup
A complete barebones WEB-INF/urlrewrite.xml
configuration example with pretty URLs.