tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: How to stop trailing slash redirects?
Date Thu, 06 Jun 2019 08:27:54 GMT
On 06/06/2019 08:31, Rob Nikander wrote:
> 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?

Why do you want to do this? What problem are you trying to solve?

I'm not sure you what you are asking is possible although I'll need to
dig through the mapping code to be certain.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message