1 2 3 Previous Next 63 Replies Latest reply: Mar 11, 2004 10:13 AM by czylcn RSS

May I integrate Apache + Tomcat + JBoss ?

dmaster Newbie

May I integrate them to make

1. static document requested through Apache

2. dynamic page through Tomcat + JBoss

If it is possible, what should I do to integrate them?

Thanks!!

P.S I had integrated "Tomcat + Apache" successfully,

but fail in JBoss + Tomcat + Apache ......

  • 1. Re: May I integrate Apache + Tomcat + JBoss ?
    Lars Bjønnes Newbie

    Just use the jboss+tomcat bundle, and use mod_jk as you would if tomcat was stand alone.

    What's not working?

  • 2. Re: May I integrate Apache + Tomcat + JBoss ?
    Aguibou KONE Newbie

    I trie it as described in the jboss official documenatation. But it does not work. Can anyboy show a sample configuration that does integrate jboss2.4.4_Tomcat401 and apache?
    Any help will be greatly appreciated
    Aguib

  • 3. Re: May I integrate Apache + Tomcat + JBoss ?
    Ignacio Newbie

    What for?

    I also thought about doing the same, as recommended in the Tomcat docos (where you can also find how to do it, with subtle modifications you can make it fit the jboss bundle).

    But, even better is the fact that you can move all your images (the 90% of your static contents, should I guess) and similar files to another server (or a virtual host, or whatever). That also allows you to host them in a cheap hosting site with huge bandwith and focus your work on the rest.

    That is, for www.myhost.com put all your images at images.myhost.com

    or at www.mycompany.com/images/myhost/

    or whatever.

  • 4. Re: May I integrate Apache + Tomcat + JBoss ?
    John Twomey Newbie

    As far as I can tell the jboss + tomcat 4 bundles will not integrate with apache, neither the mod_webapp or mod_jk connectors work with it. You will have to drop back to the tomcat 3 bundles and use mod_jk. I wish someone would prove this wrong since I really want to use a Tomcat 4 bundle.

  • 5. Re: May I integrate Apache + Tomcat + JBoss ?
    John Twomey Newbie

    I was able to get Apache working with Jboss-2.4.4 + Tomcat-4.0.1 using mod_jk.

    I found the answer here:http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ use mod_jk like you would with Tomcat 3.2.3 (see the Tomcat docs for details - not jboss docs)
    then per the above thread the code in your jboss.jcml should be:








    Not as per jboss docs:








    The trick is in the config attribute.



  • 6. Re: May I integrate Apache + Tomcat + JBoss ?
    Mike Newbie

    jtwomey -
    Glad my advice works. Do me a favour...go to this posting http://jboss.org/forums/thread.jsp?forum=50&thread=6544 and see if you can help oranhiem with his problems...maybe post a listing of your lib directory or of your classpath. He seems to be having xerces/crimson classpath problems

    Mike

  • 7. Re: May I integrate Apache + Tomcat + JBoss ?
    Thomas Clouser Newbie

    This solution also has enabled mod_webapp to function.

    My entry in my jboss.jcml is....

    <!-- Embedded tomcat 4.x with Warp Connector -->






    in my httpd.conf....

    LoadModule webapp_module modules/mod_webapp.so
    AddModule mod_webapp.c

    WebAppConnection conn warp localhost:8008
    WebAppDeploy jboss conn /jboss
    WebAppInfo /webapp-info

    I verified it was functioning by going to...

    http://localhost/jboss/index.html

    I was able to run the examples with no problems....

    HTH,

    TC

  • 8. Re: May I integrate Apache + Tomcat + JBoss ?
    John Twomey Newbie

    What version are you using?

    I tried again, as you say above and as before I connect using mo_webapp but I get the following error which is in an infinate loop that locks jboss.

    [16:09:28,480,EmbeddedCatalinaServiceSX] [org.apache.catalina.connector.warp.WarpConfigurationHandler] Cannot find "/var/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/jboss" for appl. "jboss" host "chewy.ghsinc.com"
    [16:09:28,480,EmbeddedCatalinaServiceSX] [org.apache.catalina.connector.warp.WarpConfigurationHandler] Error deploying web application "jboss" under <http://chewy.ghsinc.com:80/jboss/>


    I have tried it with a few different apps.
    I am doing this under virtual hosts not the default host, so maybe there is a catch there? Its no biggy since I have mod_jk working, but any ideas? I am probably missing something simple, as it appears the connector is looking for the context in the standard Catalina webapps directory not the jboss Default/ deploy directory.

  • 9. Re: May I integrate Apache + Tomcat + JBoss ?
    Thomas Clouser Newbie

    The difference between our configs (other than OS) is the use of virtual hosts. Just out of curiosity, can you setup an httpd.conf w/o virtual hosts and test mod_webapp on linux (<-- assumption)?

    TC

  • 10. Re: May I integrate Apache + Tomcat + JBoss ?
    John Twomey Newbie

    Will do. -in the a.m., I've had enough for now, my brain hurts :).

  • 11. Re: May I integrate Apache + Tomcat + JBoss ?
    John Twomey Newbie

    No go TC.
    Same problem even with default host and no virtuals configured.
    Yes, the OS is Linux. Back to mod_jk.

  • 12. Re: May I integrate Apache + Tomcat + JBoss ?
    Thomas Clouser Newbie

    Thanks. For the time being, I will also be sticking with mod_jk (as my target deployment environment will be some flavor of Unix). It should be noted that I did get the following errors when using mod_webapp under my NT (4.0 SP6) setup (Apache 1.3.22, JBoss 2.4.4 + Tomcat 4.0.1 Bundle, mod_webapp):

    on startup of apache

    [ERROR,EmbeddedCatalinaServiceSX] [org.apache.catalina.connector.warp.WarpConnec
    tor] Connection from localhost/127.0.0.1:2136 to localhost/127.0.0.1:8008
    [ERROR,EmbeddedCatalinaServiceSX] [org.apache.catalina.connector.warp.WarpConfig
    urationHandler] Filter mappings (0)
    [ERROR,EmbeddedCatalinaServiceSX] [org.apache.catalina.connector.warp.WarpConfig
    urationHandler] Filter mappings (0)



    on shutdown of apache

    [ERROR,EmbeddedCatalinaServiceSX] [org.apache.catalina.connector.warp.WarpConnec
    tion] Exception on socket
    java.io.IOException: Premature packet header end
    at org.apache.catalina.connector.warp.WarpConnection.recv(WarpConnection
    .java:237)
    at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequ
    estHandler.java:112)
    at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.
    java:194)
    at java.lang.Thread.run(Unknown Source)

    But on the other hand, I was able to view the JBoss examples.

    TC

  • 13. Re: May I integrate Apache + Tomcat + JBoss ?
    Xiaofeng Chen Newbie

    Hi, I have the following lines in my httpd.conf file.
    ###################################################
    <IfModule !mod_jk.c>
    LoadModule jk_module modules/mod_jk.dll


    JkWorkersFile "F:/jakarta-tomcat-3.3/conf/jk/workers.properties"
    JkLogFile "F:/jakarta-tomcat-3.3/logs/mod_jk.log"
    JkLogLevel emerg
    JkMount /admin ajp13
    JkMount /admin/* ajp13
    JkMount /examples/*.jsp ajp13
    JkMount /jboss/* ajp13
    JkMount /examples/* ajp13
    JkMount /servlet/* ajp13
    #####################################################
    After i started jboss-2.4.4_tomcat-4.0.1 using run_with_catalina, i can load http://localhost:8080/jboss/index.html.
    But when I try http://localhost/jboss/index.html, i got
    "page not found" in MS Explorer. it seems apache can't
    connect to tomcat 4.0.1.

    i tried to set the port for ajp13 in worker.properties file to 8008 or 8009, both of them don't work. my
    server environment is NT SP6, Apache1.3, JBoss-2.4.4_Tomcat-4.0.1.

    it looks all the examples worked through http://localhost:8080, but not through http://localhost.

    i also tried to use mod_webapp, it doesn't work either through http://localhost. i managed to make the apache work with tomcat4.0.1 if i only start tomcat as a standalone, not throught a embedded service in jboss.

    Any idea? thanks a bunch.



    > I was able to get Apache working with Jboss-2.4.4 +
    > Tomcat-4.0.1 using mod_jk.
    >
    > I found the answer
    > here:http://www.jboss.org/forums/thread.jsp?forum=50&t
    > read=6544
    >
    > Basically use mod_jk like you would with Tomcat 3.2.3
    > (see the Tomcat docs for details - not jboss docs)
    > then per the above thread the code in your
    > jboss.jcml should be:
    >
    > code="org.jboss.web.catalina.EmbeddedCatalinaServiceSX
    > name="DefaultDomain:service=EmbeddedTomcat">
    >
    > className="org.apache.ajp.tomcat4.Ajp13Connector"
    > port="8009" minProcessors="5" maxProcessors="75"
    > acceptCount="10" debug="1" />
    >
    >
    >
    >
    > Not as per jboss docs:
    >
    > code="org.jboss.web.catalina.EmbeddedCatalinaServiceSX
    > name="DefaultDomain:service=EmbeddedTomcat">
    >
    > className="org.apache.ajp.tomcat4.Ajp13Connector"
    > port="8009" minProcessors="5" maxProcessors="75"
    > acceptCount="10" debug="1" />
    >
    >
    >
    >
    > The trick is in the config attribute.
    >
    >
    >
    >

  • 14. Re: May I integrate Apache + Tomcat + JBoss ?
    John Twomey Newbie

    It seems you forgot this line in httpd.conf:

    AddModule mod_jk.c

    For some reason it works without it if you use the "Include mod_jk.conf technique", but it is required when adding the code directly to httpd.conf.

    The examples will not work with the Tom 4+ package unless you modify some files (see other posts if you want them to work) since they are not added to the context in the integrated jboss Tom 4+.

    Is easier to add your own .war for testing (jakarta Struts comes with some plug and play wars, download it and try one of their example wars :)).

    Also -this will add all content in a webapp to the mount
    /examples/* no need to add this also /examples/*.jsp

    Good Luck

    JT

1 2 3 Previous Next