5 Replies Latest reply on Feb 6, 2002 12:23 PM by coetmeur

    Virtual Host with JBoss/Tomcat

    fjsb

      Do you know how to make a virtual host in JBoss and Tomcat?

      Thanks.

        • 1. Re: Virtual Host with JBoss/Tomcat
          jimotte

          I believe you can use the server.xml- at the end is even an example of virtual hosts- The server.xml is the 1 in tomcat/conf- you need to put it in your jboss/conf/yourConf and replace the following in jboss.jcml:

          <!-- Uncomment to add embedded tomcat service -->

          ../conf/pdfMan/server.xml


          Should work- Ive used the server.xml for other stuff- but have noticed the virtual host stuff in there
          Jim

          • 2. Re: Virtual Host with JBoss/Tomcat
            jimotte

            oops- replace:
            <!-- Uncomment to add embedded tomcat service -->

            ../conf/pYourConf/server.xml

            • 3. Re: Virtual Host with JBoss/Tomcat
              fjsb

              I have done what you have said me and when a jsp try to access to an ejb, JBoss says:

              NameNotFoundException: env not found.


              It seems that jsp can access to ejb. ¿ What can I do to repair thir error?

              Thanks. Paco

              • 4. Re: Virtual Host with JBoss/Tomcat
                jimotte

                Paco-
                that sounds like a problem in your JNDI lookup of the bean- not the virtualHost access- how are you looking up your EJB?
                It should be like this:
                //get naming context
                Context ctx = new InitialContext();

                //look up jndi name
                Object ref = ctx.lookup("MyEJBName");

                where
                <ejb-name>MyEJBName</ejb-name>

                is in the deployment descriptor- make sure it is the same name as in localhost:8082 under service=JNDIView then list - find your bean name.... (I have found that with JBoss the lookup(java:comp/env/MyBeanName) is not the way to go- just lookup(MyBeanName))- you can also check the server logs to make sure the bean you want was bound...

                Jim


                • 5. Re: Virtual Host with JBoss/Tomcat
                  coetmeur

                  with jboss244 I've tried to mathe vitual host work...

                  as far as I've read there are no way to make it work
                  with standard jboss244+tomcat401, since
                  the server.xml is not read, and elements
                  are not interpreted in the

                  I've poste a patch to correct it and this
                  seems to work well...
                  http://sourceforge.net/tracker/index.php?func=detail&aid=512854&group_id=22866&atid=376687

                  I can transmit the compiled catalina-engine.jar
                  to whoever want it...