tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: mod_jk configuration
Date Mon, 30 Oct 2006 17:27:23 GMT

> But when I use "JkMount /jsp-examples ajp13" doesn't this tell Apache that
> everything inside /jsp-examples "goes"  to Tomcat?

No, it doesn't. JkMount does two kinds of matching: exact and wildcard.

JkMount /jsp-examples   ajp13

This will map the URI "/jsp-examples" to Tomcat, and NO OTHERS AT ALL.

JkMount /jsp-examples/*.jsp ajp13

This will map any URI that looks like "/jsp-examples/ ..... .jsp".

Note that the first example and the second example are completely
separate. If you want Tomcat to handle "/jsp-examples" and everything
inside that URI space, you need to do this:

JkMount /jsp-examples    ajp13
JkMount /jsp-examples/*  ajp13

But, since you want Apache httpd to handle all the static content,
you'll have to decide what Tomcat /should/ handle. I would usually have
something like this for each of my webapps:

JkMount /webappName/*.jsp  ajp13
JkMount /webappName/j_security_check ajp13

This covers all JSPs as well as the built-in J2EE authentication system
supported by Tomcat. If you have other URIs as well, then you should
define them. There's nothing wrong with having a lot of JkMount directives:

JkMount /webappName/servlet/*             ajp13
JkMount /webappName/some/specific/servlet ajp13
JkMount /webappName/another/servlet/name  ajp13

Just list everything that you want Tomcat to handle, and everything else
will be served by Apache httpd.


View raw message