This has been a great and informative thread... I'm wondering now, how to accomplish what I want to do in Tomcat alone, rather than looking for a Tomcat+Apache solution (sounds simpler).

The issue is that I want ALL directory-like urls resolved by a particular servlet (which is a Spring dispatcher servlet, but never mind that), but I would like very few kinds of static files (which I could name explictly *.gif, *.png, *.css or put under a static place) served statically (ie by the "default" servlet.

The problem is that the url-pattern for a directory-like urls covers all urls.

Is there a way to do the reverse of normal, state that you want a particular url-pattern (e.g. "/static/*") to go to the "default servlet" , and everything else (e.g. "/*") to go to a particular servlet. If so, how do I indicate the "default servlet" in my web.xml?

(And I've already had recommendations from people to change the URLs for the dynamic stuff to something else, but that's not what the client/customer/user/design wants -- the url is very much part of the user interface in this application).

thanks

Tim



Fritz Schneider wrote:
Chris,

Earlier versions of Tomcat were quite a bit slower than Apache when
delivering static pages. For high volume work the preferred solution was to
have Apache listening on port 80, and when it received a request for a page
from in a J2EE context, to forward it to Tomcat, listening on 8080. A
similar connector is used for Microsoft IIS.

Tomcat had a major rewrite for Tomcat 5, and the performance difference on
static pages is now minor. An Apache-to-Tomcat connector is now used for the
following reasons (and probably a few more):

1) History. We started out that way, and there's no reason to change.
2) Expansion. We have been running Apache (or IIS) and we need to add a J2EE
container.
3) Load balancing. We have too many requests for a single server, so we have
Apache take the incoming requests and dole them out to three or four Tomcat
servers.
4) Management. We have a lot of customers. Some need CGI, some need PHP, and
some need J2EE.

I hope this helps,
Fritz

-----Original Message-----
From: Chris [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 9:39 AM
To: Tomcat Users List
Subject: Re: Tomcat vs Apache



Apache is not a J2EE container - you are off-roading on this one ;-)


Thanks. That was pretty much what I wanted to find out. BTW, I keep hearing of people using Apache and Tomcat in conjunction. How does that work?

Chris


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to