Hi, Scott

You only need to specify JkMount directives in mod_jk.conf to tell Apache which
URL mappings it has to delegate processing to Tomcat.  The url mappings in
web.xml tell Tomcat which servlet/jsp will handle specific mappings.  

The /servlet qualifier I believe is a backward-compatibility feature to earlier
servlet containers where you had to specify /servlet/<servlet-name> to access
servlets.  You're not necessarily stuck with this qualifier - you can create
your own via the above-mentioned JkMount directives.  However, I find it very
convenient to be able to qualify my servlets differently from static content to
simplify deployment of servlets on Tomcat, and html pages and other files on
Apache.

Regards,
Noel Lecaros

Scott Goldstein wrote:
> 
> I'm using Apache and Tomcat 3.2 and I'm trying to understand the mod-jk
> configuration file.
> 
> Suppose, that I want to access servlets through URL's of the form:
> 
> http://host/webappName/servletName
> 
> It seems that I can do this one of two ways:
> 
> 1.  Have all requests of the form http://host/webappName/* go to Tomcat.
> 
>     The problem with this, is that I want Apache to serve my html pages
> 
> 2.  For every servlet, put in a line in the mod-jk configuration file to pass
> the request to Tomcat.
> 
>     It would seem with this, I would not only have to specify it in the mod-jk
> configuration file, but also in the web.xml file.  It seems like there should
> be an easier way.
> 
> Am I stuck with putting all of my servlets in a "webAppName/servlets"
> directory if I want to avoid this problem?  Is this compatible with the spec
> for WAR files?
> 
> On that note, where can I even find the spec for WAR files?
> 
> Thank you very much for the help.
> 
> Scott Goldstein
> 
> ------------------------------------------------------------
> "Just a mirror for the sun...
>  My smiling eyes are just a mirror for the sun."
> ------------------------------------------------------------

Reply via email to