We have an existing Tomcat server that is running an existing app "Tracdat" with its folder under the "webapps" directory. Then comes along this Shibboleth app, and so I follow the setup guide (https://spaces.internet2.edu/display/ShibInstallFest/Shibboleth+Workshop+Series+-+Windows+Identity+Provider) for steps 1 - 6 (the setup assumes a clean Tomcat server or using their VM, but I'm trying to set it up on our existing Tomcat server). The setup installs the app in a directory off of C: root (see below) instead of in the webapps directory, which I don't get, but I'm a Tomcat newbie. Anyway, when I try to access the status page at (https://mydomain.edu:8443/idp/status), it just gives me a 404 error. My question is: how does Tomcat know how to get to "/idp/status"? The other existing app that runs fine is like this (https://mydomain.edu:8443/tracdat). The setup guide did have me create a file "C:\Tomcat55\conf\Catalina\localhost\idp.xml" with the following content (not sure if this helps):
Tomcat knows where to look for "/idp/status" based on how the idp webapp was deployed. The context name for a webapp that was deployed via a Context xml file in TOMCAT_HOME/conf/catalina/localhost would be "xxx" if the Context file was named "xxx.xml". You would think that the contextRoot attribute in the Context file would set the context name, but in this particular case, it's ignored and the name of the file is what's used, instead.
Since your documentBase is the WAR file at c:\opt\shibboleth-idp\war\idp.war, Tomcat will open that WAR, and look at its WEB-INF/web.xml file. It would then attempt to pattern-match the URL substring "/status" against the various servlet url-patterns that were defined in that file. If a match is found, the matching servlet will get passed the URL request. If not, Tomcat's default servlet will attempt to handle it, but looking for a file named "/status" in the WAR. If if cannot find one, it will rended a "404" page.
Got idle CPU cycles? Join the war on COVID-19 by donating them to find the coronavirus' weak spots. folding@home Runs in the background. https://foldingathome.org
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!