6 Replies Latest reply on Jan 25, 2002 1:51 AM by twhphan

    deploying the war separately under tomcat

    janheise

      hi all,

      another one: i tried to deploy the web-part of my application
      separately from my ejb-parts. i use jboss2.2.2 and tomcat3.2.2.
      i dropped the ejb-jar under jboss/deploy, unpacked the war
      under tomcat/webapps/appname and my authentification stuff
      was broken. i use form-based login via a database-connector
      which works fine when deployed via jboss/deploy. jboss and tomcat
      run in the same vm but the exception clearly states:
      javax.naming.NameNotFoundException: env not bound
      java.naming.factory.initial, provider.url and factory are
      set to the correct values. the exception propagates from
      org.jboss.tomcat.security.JBossSecurityMgrRealm.authenticate.

      someone out there experienced something similar or has a solution?

      jan

        • 1. Re: deploying the war separately under tomcat

          Ummm. I take it you're using a standalone version of tomcat? In this case, I don't think you can't use the JBossSecurityMgrRealm interceptor which is intended for integrated web containers.

          You have to use tomcat's own authentication and insert the basic org.jboss.tomcat.security.JBossRealm interceptor after this to enable the username and password to be propagated to JBoss.

          • 2. Re: deploying the war separately under tomcat
            janheise

            hi luke,

            i'm using the integrated tomcat. but i need to deploy
            the stuff in separate parts and not one ejb-jar and one
            war in jboss/deploy. (some designers are going to change
            the jsps) i need the also the auth working. i'm going
            to try your suggestion and let you know.

            thanks so far, jan

            • 3. Re: deploying the war separately under tomcat

              Ah, OK I see what's up. I have had the same problem lot's of times.

              You can't have jsp changes automatically recompiled with the integrated JBoss/Tomcat at the moment. You always have to redeploy the whole app, losing any state that your web user might have.

              The best plan is to run a separate instance of tomcat against JBoss, and configure it to point to your unpacked, development web-app.

              • 4. Re: deploying the war separately under tomcat
                janheise

                really?

                recompilation works quite great under tmp/Deploy/xxx.war/webxxxx and i made some tests (it's quite a while ago) that the classloader would load new classes under tomcat/webapps/app/WEB-INF/classes. so i thought that what i want to achieve would be no big deal. i did not try to recompile jsps under tomcat/webapps yet but if that does not work it would really be a surprise. i did not look into the sources but why should tomcat not recompile new jsps under tomcat/webapps?

                • 5. Re: deploying the war separately under tomcat
                  twhphan

                  Hi,

                  I posted my problem in:

                  http://main.jboss.org/thread.jsp?forum=50&thread=7293

                  and I think that org.jboss.tomcat.security.JBossRealm interceptor is my answer. How may I make a standalone Tomcat to use JBossRealm after Calatina realm performed authentication so that the credentials can be propagated to JBoss?

                  Thanks

                  • 6. Re: deploying the war separately under tomcat
                    twhphan

                    in Catalina, should I put





                    in my server.xml

                    What .jar file do I need for Catalina to load?

                    Thanks