If you use mod_jk, you can set the roots to the same for apache and tomcat. Just make sure you specify in your JkMount directive what filetype to send to tomcat, such as "/myapp/*.jsp" instead of "/myapp".
John Turner [EMAIL PROTECTED] -----Original Message----- From: Ola Theander [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 20, 2002 4:56 AM To: 'Tomcat Users List' Subject: RE: Questions about web solution based on Tomcat & Apache. Hi again John. Is it possible for Apache and Tomcat to share the same web root, i.e. Tomcat's /webapp and Apache's /webapp are both mapped to the same file system folder e.g. /usr/local/webs without Apache and Tomcat getting confused about which one of them that should handle a particular document? /ola > -----Original Message----- > From: Turner, John [mailto:[EMAIL PROTECTED]] > Sent: den 19 juli 2002 15:14 > To: 'Tomcat Users List' > Subject: RE: Questions about web solution based on Tomcat & Apache. > > > > With mod_jk, you can also get more specific than just a path > (/examples), I think. You can say "/examples/*.jsp", for example. > > So you could say something like "/myapp/*.jsp" and have those > requests go to tomcat, but "/myapp/*.html" or "/myapp/*.gif" > would still be served by apache. To do this you will need > mod_jk, not mod_webapp. > > It would look something like this in your httpd.conf (using mod_jk): > > JkMount /myapp/*.jsp ajp13 > > John Turner > [EMAIL PROTECTED] > > > -----Original Message----- > From: Ola Theander [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 19, 2002 8:48 AM > To: 'Tomcat Users List' > Subject: RE: Questions about web solution based on Tomcat & Apache. > > > Hi John. > > Thanks for your answer. Unfortunately I'm not sure that I > understand you completely. Regarding your answer to question > 1, I want Apache to serve html, image and other static > content while Tomcat processes the dynamic content such as > jsp pages, i.e. I don't want to use Tomcat to serve static > content, i.e. that means the use of either the AJP or Warp > connector. Does the use of these connectors require that I > separate the static content files from the files for dynamic content? > > Kind regards, Ola > > > -----Original Message----- > > From: Turner, John [mailto:[EMAIL PROTECTED]] > > Sent: den 19 juli 2002 14:09 > > To: 'Tomcat Users List' > > Subject: RE: Questions about web solution based on Tomcat & Apache. > > > > > > > > 1) Yes. Tomcat can serve images and HTML, that is the > > purpose of the Coyote HTTP connector, which is installed with > > tomcat by default. It was on my installations. > > > > 2) The difference is #1. If you want to divide static > > content and dynamic content, you want AJP (mod_jk). The > > current WARP implementation > > (mod_webapp) does not differentiate between static and > > dynamic content. It may in the future. I hope it does, > > though I've had zero problems with mod_jk on both tomcat 3 > > and 4. With mod_webapp, all content is served by tomcat, > > apache is not involved except as a request receiver. > > > > John Turner > > [EMAIL PROTECTED] > > > > > > -----Original Message----- > > From: Ola Theander [mailto:[EMAIL PROTECTED]] > > Sent: Friday, July 19, 2002 7:23 AM > > To: [EMAIL PROTECTED] > > Subject: Questions about web solution based on Tomcat & Apache. > > > > > > Dear subscribers. > > > > I have two questions about using Tomcat 4.x & Apache 2.x as a > > base for web application development: > > > > 1) A solution typically consists of html, jsp pages and > > servlets. Is it possible to store html, jsp and servlets > > based on the logical structure of the solution and have > > Tomcat process only based on the file extension or must all > > jsp and servlet files be collected in the folder pointed out > > by the WebAppDeploy attribute in httpd.conf? I.e. if I have a > > solution where I store customer data in a database I'll > > probably have at least a form page for registering a new > > customer, a list view where I list all customers and a > > servlet to store submitted customer data in a database. In a > > simple case the form page would be a html page and the list > > view an jsp page. If these files where to be grouped > > logically, i.e. by task, the form page, the jsp list page and > > the servlet should be in the same directory on disk but as I > > understand it Apache/Tomcat integration requires me to have > > the html pages in one directory structure for access by > > Apache and jsp/servlets in another structure, pointed out by > > WebAppDeploy, for access by Tomcat. Is this correct? With a > > logical grouping of files mentioned above I mean a directory > > structure like > > this: > > > > Customer Web > > |-----| > > | customers > > | |---- new_customer_from.html > > | |---- list_customers.jsp > > | |---- store_new_user.class > > | > > |-----| > > companies > > > > 2) As far as I know there are two connectors for integrating > > Tomcat and Apache, Warp and AJP. When I experimented I've > > used the warp connector, but I don't really know the > > difference between the two besides that they utilize > > different protocols. If I can get some more information on > > this matter I'll be grateful. > > > > Kind regards, Ola Theander > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:tomcat-user-> [EMAIL PROTECTED]> > > For > > additional commands, > > e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- > > To unsubscribe, e-mail: > > <mailto:tomcat-user-> [EMAIL PROTECTED]> > > For > > additional commands, > > e-mail: <mailto:[EMAIL PROTECTED]> > > > > > > > -- > To unsubscribe, e-mail: > <mailto:tomcat-user-> [EMAIL PROTECTED]> > For > additional commands, > e-mail: <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: > <mailto:tomcat-user-> [EMAIL PROTECTED]> > For > additional commands, > e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
