Subject: Re: Questions about Tomcat and Apache Integration?
From: "Jack Gao" <[EMAIL PROTECTED]>
 ===
Nobody has interests with it?

Well, maybe I should give more information. I believe somebody must have
interests with it also.

I tried to use mod_webapp, but since I can not get apache and tomcat build
successfully on my Windows 2000 box, I used precompiled mod_webapp with
Tomcat 4.0.1. But it worked very unstable, so I go to mod_jk. mod_jk worked
perfect to me. But then I got this question. Now I did more test and
research on it, here is what I got.

To avoid apache pass all request to Tomcat, I need to add something like
this into mod_jk.conf (which will be included in httpd.conf of apache.)

JkMount /myapplication/*.jsp ajp13
JkMount /myapplication/servlet/* ajp13

This is what mod_jk how-to document suggestion. So it will only forward
request for jsp and servlet to tomcat, and all the others (assume to be
static resources) will be handled by apache.

So far so good, but it's for Tomcat 3.x, not Tomcat 4.x. Because with Tomcat
3.x, all servlet will go to servlet directory, but with Tomcat 4.x, by
default it will not. So, a URL like http://xxxxx.xxx.xxx/myapplication/list
is very possible to be request of servlet. How can we handle it? We had to
use:

JkMount /myapplication/* ajp13

This will forward all the request to Tomcat, then we got this static
resource problem again.

So, maybe we need to keep using "/servlet" for all servlet request in order
to use mod_jk.

I don't know if mod_webapp.so resolved this kind of problem, because I can
not found document on it.

Any commons, suggestions, notes even a link to some documents are welcomed.

Thanks,

Jack

"Jack Gao" <[EMAIL PROTECTED]> wrote in message
news:a9nmrr$5s0$[EMAIL PROTECTED]...
> Hi, List
>
> I have some questions about Tomcat and Apache integration.
>
> As I remember that the reason of not use Tomcat as a web server but only
> JSP/Servlet engine is because of performance. Tomcat is not as good as
> Apache to handle large number of requests at same time, and handle static
> resources. So, I assume that by integrate Tomcat and Apache together, when
a
> request is for a static resource, like a html file or an image file, the
> request will not go to Tomcat, but been processed by Apache directly.
>
> But when I go through the log files of Tomcat 4.0.3, I found that request
of
> image files also go to Tomcat, it also been logged into
> localhost_access_log......txt file.
>
> So I got confused. Does this mean, this image files also processed by
> Tomcat? or tomcat just log it as a access event, but didn't process it? If
> Tomcat need to handle this kind of static resources, why we still need
> Apache? If Apache just pass through the request to Tomcat, and forward
> response to client, that will not help the performance I think.
>
> Anybody has some info on this?
>
> Thanks and regards,
>
> Jack
>
>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to