We are deploying two war files in tomcat's webapps folder, let's say public.war and private.war
We'd like to setup HTTP Basic Authentication only for private.war (not for all deployed war files) but it seems we would have to configure this in the exploded /webapps/private/WEB-INF/web.xml (or modify the war itseld), which we'd like to avoid.
The reason for this is we are retrieving private.war from a 3rd party source and if someone for instance updates it to the latest version our changes to web.xml would be overwritten (right?).
Is there a way to enable Basic Authentication in Tomcat just for one specific context-path from let's say - something like conf/web.xml or another file?
We would especially like to avoid modifying the deployed (or exploded) war file.