tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Nikander <rob.nikan...@gmail.com>
Subject How to stop trailing slash redirects?
Date Thu, 06 Jun 2019 07:31:52 GMT
Hi,

I would like requests to a webapp to have paths that look like this:

    http://server/myapp <http://server/myapp>   not:  http://server/myapp/ <http://server/myapp/>

But for some reason, Tomcat keeps redirecting the 1st to the 2nd. I’m aware of the attribute
`mapperContextRootRedirectEnabled` (on the Context), but setting that to “false” is not
helping.  My web.xml looks like:

    <servlet-mapping>
        <servlet-name>MyServlet</servlet-name>
        <url-pattern></url-pattern>
        <url-pattern>/other</url-pattern>
        …

What is going on? How do I stop the redirects?

thanks,
Rob
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message