вс, 21 июл. 2019 г. в 00:09, Richard Huntrods <huntr...@athabascau.ca>:
>
> I still am having trouble understanding why the web application's
> WEB-INF/web.xml would be the appropriate place to put the change when I
> want to affect ROOT. I would have thought webapps/ROOT/WEB-INF/web.xml
> would have been the correct one.

Every web application has its own set of files, rooted to its own
directory or zipped as war file.

The "WEB-INF/web.xml" file is one of those files.

The "WEB-INF/web.xml" file for the "ROOT" web application is indeed
$CATALINA_BASE/webapps/ROOT/WEB-INF/web.xml.

The file for the "manager" web application is
$CATALINA_BASE/webapps/manager/WEB-INF/web.xml.

and so on.

The global defaults file "$CATALINA_BASE/conf/web.xml" should not be modified.

> which is considered "more elegant" or better

+1 to Martynas's answer.

The web.xml is defined by specification, better understood and better
tested, and is supported by other Servlet Containers besides Apache
Tomcat. In general, there should be more people who are able to help
with it, compared to helping with a RewriteValve.

(Though if there are a lot of Apache HTTPD Server administrators
around you, the rewrite syntax will be more familiar to them).

Best regards,
Konstantin Kolinko

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

Reply via email to