8 Replies Latest reply on Jan 18, 2007 10:22 AM by Peter Johnson

    JBoss Web vs Tomcat?

    jk;l jkl; Expert

      What's the difference between JBoss Web and Tomcat?

      I have an exploded archive called "jbossweb-tomcat55.sar" in my deploy directory...so that names implies it's both JBoss Web and Tomcat...huh?

      I have a standard installation of JBoss, and I'm able to serve up static (.html) and dynamic (.jsp) web pages by pointing to the appropriate link in my browser when the JBoss application server is up and running. What is being used to deliver these web pages: JBoss Web, Tomcat, Apache, or JBoss Application Server itself?

      Thanks a lot.

        • 1. Re: JBoss Web vs Tomcat?
          Peter Johnson Master

          JBoss Web is the new web server based on the Apache Portable Runtime. This web server handles not only servlets/JSPs, but can also be configured to run PHP (I've done that) and .Net (I haven't done this yet).

          The jbossweb-tomcat55.sar is a version of Tomcat 5.5 used by JBoss to handle static and dynamic web content (html, css, gifs, jsps, servlets, etc). This is not JBoss Web.

          • 2. Re: JBoss Web vs Tomcat?
            Scott Stark Master

            See the jbossweb section in the jboss.org projects for more info as well.

            • 3. Re: JBoss Web vs Tomcat?
              jk;l jkl; Expert

              Thanks for your responses. Could you provide some more detail on this, as I'm still confused. I've listed some questions below:

              1) For somebody who will not need to use the .NET and PHP features of it, what is the purpose of using JBoss Web?

              2) If I download JBoss Web and add it to my JBoss AS installation, do I still need Apache web server (or any web server) on top of that, or is it only good for JSPs/Servlets?

              3) In my default download of JBoss AS, how come I can already access static and dynamic HTTP pages? Is it because of the jbossweb-tomcat55.sar?

              4) Do I need Apache on top of jbossweb-tomcat55.sar? Where does JBoss Web fit in?

              5) Is the choice really between JBoss Web versus Tomcat AND Apache together? Can JBoss Web do the job of both the others in one package? (Is that the value proposition - installing one thing instead of two?)


              • 4. Re: JBoss Web vs Tomcat?
                Peter Johnson Master

                1) How about performance? See http://labs.jboss.com/file-access/default/members/jbossweb/freezone/index.html

                2) I do not know if that is possible at this time. I have never attempted it.

                3) I already answered this question.

                4) "need"? No. Could you use it? Yes. See http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss

                5) That is one way of looking at it.

                I recommend that you read the documentation on JBoss Web to find out more information about it.

                • 5. Re: JBoss Web vs Tomcat?
                  jk;l jkl; Expert

                  A couple more questions:

                  1) Can you still use things like .htaccess in JBoss Web to get the full functionality that Apache offers in terms of its configuration power and flexibility? Or is .htaccess not possible in JBoss Web?

                  2) Does JBoss Web replace jbossweb-tomcat55.sar, or does it simply connect to it? (i.e. Will jbossweb-tomcat55.sar be necessary in the deploy directory of a JBoss configuration that's using JBoss Web?)

                  3) The following page says JBoss Web is a standalone web server. It looks like you start it up separately, you deploy things to its own deploy directory...if it's so standalone, do you front JBoss AS with JBoss Web (sort of like how you from Tomcat wth Apache), or do you have two distinct servers running simultaneously - JBoss AS and JBoss Web? I hope it's the former option because of my next question...


                  4) If currently I deploy EARs to JBoss AS that contain JARs and WARs, how would I make it work if the WARs now need to be put in the JBoss Web deploy dir rather than the JBoss AS deploy dir, if there are two separate servers running?

                  5) If there are not two separate servers running and you in fact connect JBoss Web to intercept requests to JBoss AS or something like that, what's the benefit to connecting JBoss Web to JBoss AS, versus connecting Apache to jbossweb-tomcat55.sar?

                  The performance graph on the JBoss Web homepage only compares JBoss Web to Tomcat alone...I wonder where Apache+Tomcat would lay on that graph...probably up there with JBoss Web? I say this because Apache+Tomcat is supposed to seriously outperform Tomcat alone when serving static content...so what's the benefit to connecting JBoss Web to JBoss AS, versus connecting Apache to jbossweb-tomcat55.sar?


                  • 6. Re: JBoss Web vs Tomcat?
                    Peter Johnson Master

                    A few answers:

                    1) I don't know.

                    2) Yes. If you look at JBoss AS 5.0 beta 1, you will see JBoss Web in use (look for the notification that it could not find the shared object and is thus not running Apache Portable Runtime).

                    3) As noted in #2, JBoss Web is part of JBoss AS starting in 5.0. Though you can run dual servers, with Web handling static, JSP and servlet content and AS handling EJBs.

                    4) Since there is only one server, you place things in the deploy directory as usual. If running dual server, the war files go into the deploy directory under Web and EJB jar files go into the deploy directory under AS. You, of course, have to properly configure the JNDI in your web applications in Web to look up the EJBs in AS. Also, you would want to move war files out of ear files so they can be separately deployed. Finally, if you have supporting/utility jar files, they might have to go into both locations depending on which classes use them. Note that this is no different that what you would currently have to do if you decided to front end JBoss AS with Tomcat (or Jetty) running on a separate system. (While this is possible, I do not know of anyone actually doing this.)

                    5) I don't know.

                    For the questions I don't have the answers to, you might want to ask on the JBoss Web forum.

                    • 7. Re: JBoss Web vs Tomcat?
                      jk;l jkl; Expert

                      By the way, to connect Apache to Tomcat, is mod_jk or is mod_proxy_ajp recommended by JBoss? Which is preferrable?

                      What are the tradeoffs or differences between the two, from the perspective of JBoss?

                      • 8. Re: JBoss Web vs Tomcat?
                        Peter Johnson Master

                        Instructions for setting up mod_jk 1.2 can be found at http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss.

                        Same for mod_proxy_ajp can be found at [urlhttp://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_proxyWithJBoss[/url].

                        I do not know which is preferred (I have seen more references to people using mod_jk than to mod_proxj_ajp), nor do I know the tradeoffs or differences. Perhaps the HTTPD web site could shed some light on that.