• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Deploying Shibboleth app to existing Tomcat server

Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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):

<Context docBase="c:\opt\shibboleth-idp\war\idp.war"
swallowOutput="true" />

Thank you very kindly for any advice.

Saloon Keeper
Posts: 27819
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic