Uploaded image for project: 'Apache Tomcat Maven Plugin'
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-202

Cannot enable SSO for multiple contexts in embedded tomcat

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0
    • backlog
    • tomcat7

    Description

      I am trying to enable SSO between two webapps being deployed in an embedded tomcat instance created using the tomcat7-maven-plugin.

          1. Github Repo/Zip and instructions to reproduce the problem

      Please take a look at the pom.xml (http://bit.ly/XQPCYV) and the server.xml (http://bit.ly/UenijR). If you wish, you could also clone the github repo (https://github.com/ajorpheus/sso-embedded-tomcat) or download the zip (https://github.com/ajorpheus/sso-embedded-tomcat/archive/master.zip) (718kb). If you do so the instructions to reproduce the problem are in the Readme.

          1. The problem

      The embedded tomcat runs fine and the two webapps are deployed to the appropriate contexts as expected. However, SSO is never enabled even though the server.xml has the correct configuration. Well, I assume it is correct since the exact same server.xml works fine in a standalone Tomcat 7 instance.

      My tinkering has indicated that the problem is related to how the server.xml ends up in the embedded tomcat instance. Initially, I was under the wrong impression that simply having the server.xml in src/main/tomcatconf was enough since it did get copied over the embedded tomcat ( in target/tomcat/conf). But it seems, unless you refer to the server.xml in the plugin configuration like so :

      <serverXml>src/main/tomcatconf/server.xml</serverXml>

      , it does not get honored and the config contained does not have any affect.

      However, as soon as I uncomment that above, the <webapps> portion of the configuration is completely ignored and the webapps are never deployed.

      There seem to no existing bugs (http://bit.ly/XQPWaf) relevant to the issue at hand and I am out of ideas at the moment. It would be great if you could share your experience and point me to what I might be missing.

      Attachments

        Activity

          People

            olamy Olivier Lamy
            ajorpheus AJ
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: