Open pallix opened 10 years ago
The default generated web.xml file specify the following url-pattern in the servlet-mapping section:
web.xml
url-pattern
servlet-mapping
<url-pattern>/*</url-pattern>
According to this page: http://grokbase.com/p/tomcat/users/04cfv9wy5g/tomcat-redirecting-when-base-uri-doesnt-have-trailing-slash and one answer on this StackOverflow page: https://stackoverflow.com/questions/11055608/tomcat-is-not-adding-trailing-slash-to-web-apps-context
this cause Tomcat to not redirect URL that don't end with a trailing slash.
I edited the WAR to replace web.xml and the url-pattern by:
<url-pattern>/</url-pattern>
which cause Tomcat to redirect correctly.
Are there any reasons to have /* instead of /. If not, can we fix this?
/*
/
The default generated
web.xml
file specify the followingurl-pattern
in theservlet-mapping
section:According to this page: http://grokbase.com/p/tomcat/users/04cfv9wy5g/tomcat-redirecting-when-base-uri-doesnt-have-trailing-slash and one answer on this StackOverflow page: https://stackoverflow.com/questions/11055608/tomcat-is-not-adding-trailing-slash-to-web-apps-context
this cause Tomcat to not redirect URL that don't end with a trailing slash.
I edited the WAR to replace web.xml and the url-pattern by:
which cause Tomcat to redirect correctly.
Are there any reasons to have
/*
instead of/
. If not, can we fix this?