6 Replies Latest reply on May 14, 2003 12:57 AM by Jon Barnett

    JbossWEB and Apache

    vdreamer Newbie

      I am new to Jboss, I currently have a redhat 7.3 box running J2SE and Tomcat 4.

      I am trying to build a new J2EE server on Redhat 9. I have downloaded Jboss and have installed it correctly.

      I am trying to find some info on configuring Apache to forward JSP and Servlet requests to JbossWEB, as I would like to get away from Tomcat if possible. I will be doing virtual hosting on this box, so I need to know if JbossWEB supports this, and where i can find documentation on this type of setup.

      Any help would be greatly appreciated.

      To the developers of Jboss...... Thanks a million! Open source rules!

        • 1. Re: JbossWEB and Apache
          Jon Barnett Master

          jbossweb-jetty and jbossweb-tomcat do not currently support user defined contexts since JBoss manages the deployment operation of web applications. This is despite the fact that the stand-alone servlet containers do support these requirements.

          Work-arounds that have been suggested in the past have included using URL rewriting/proxying in an Apache front-end and mapping to specific JBoss WAR deployments in the back.

          More details about connector configuration and coupling via AJP13 connectors may be referenced in the Jetty or Tomcat FAQs, depending on your servlet container preference. Apache configuration may be found at the Apache website.

          Your other option is to separate your EJB container and your servlet container and run them in separate VMs if you absolutely need context-supported virtual hosting - the trade-off being resource and speed efficiencies. On the other hand, I believe that at least Tomcat and probably Jetty require a separate VM for every virtual host anyway.

          • 2. Re: JbossWEB and Apache
            Jon Barnett Master

            With Jetty, follow this thread for configuring contexts:
            http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= you are putting a jboss-web.xml file into your WAR.

            • 3. Re: JbossWEB and Apache
              vdreamer Newbie

              Is it better to use Jboss with Tomcat for virtual hosting, instead of jbossweb (jetty) ?

              • 4. Re: JbossWEB and Apache
                Jon Barnett Master

                They will both support virtual hosts using the jboss-web.xml extension to your WARs. Jetty is smaller and faster. But there may be special features that you can only find in Tomcat - for example, you may prefer the Tomcat logging format. In most instances though, Jetty is fine.

                • 5. Re: JbossWEB and Apache
                  vdreamer Newbie

                  I keep hearing that i need to use the jboss-web.xml in the WEB_INF folder for my war file, but like i said I'm new to this.... I don't know what that means. I don't have a WAR file, or a WEB_INF folder.

                  I bought the $10 doc, and turned to the chapter on integrating servlet containers, but for the jboss/jetty section, it does not explain this very well.

                  What is the WAR that i need to deploy? I see a SAR for jbossWeb...

                  On the Jakarta Tomcat v4, this process is very simple. Why is it so complex with Jboss/Jetty?

                  • 6. Re: JbossWEB and Apache
                    Jon Barnett Master

                    A WAR is your web application archive file - normally you deploy your web application as a WAR with all the resources, support classes and libraries packed into it. If you look at your JBoss distribution, in the deploy directory you will find an exploded WAR called jmx-console.war that shows you the general structure of a web application when the file is unpacked. JBoss can get Tomcat to deal with packed and unpacked WARs.

                    Now, JBossers aren't necessarily web app specialists (they may not normally deal with servlets, JSPs and the like) and it is better to go to specialist sites such as Apache Tomcat for information on web application packaging. The latest JBoss simply includes and integrates the latest Tomcat (4.1.24) in the service. Tomcat standalone would normally take a WAR, say MyApp.war which is dropped in the webapps directory, and expands the archive into a directory under the webapps directory called MyApp. JBoss just doesn't bother with that and tells Tomcat to run the application without unpacking it when it finds a WAR file or a *.war directory in its deploy directory. The important thing to realise is that Tomcat takes care of the actual execution of the servlets and JSPs.

                    So read up on servlets, JSPs and WARs to understand the web application requirements in terms of packaging and inclusions - particularly what is normally in the WAR's WEB-INF directory.

                    Hope that clarifies things a bit with regard to JBoss requirements versus Tomcat requirements.