You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joe Emenaker <jo...@emenaker.com> on 2001/04/03 03:02:07 UTC

Should "tomcat-auto" do this?

When I run Tomcat, it auto-generates an include file for Apache called
"tomcat-auto". It uses a directive called "JkMount" to redirect certain
URL's to Tomcat's non-http interface. For example, my "tomcat-examples"
webapp yields a couple of entries that look like:

   JkMount /tomcat-examples/servlet/* ajp12
   JkMount /tomcat-examples/*.jsp ajp12

So that anything beginning with "/tomcat-examples/" and ending in ".jsp" or
anything beginning with "/tomcat-examples/servlet" will get redirected to
Tomcat.

Okay.... fine. However, I can define other servlet mappings in the web.xml
file that don't get reflected in tomcat-auto. For example, suppose I made a
servlet called MyNewServlet.class and put it into tomcat-examples. Let's
also suppose that I mapped that to the path "newserv" in my web.xml.

If I do this, I can get to the servlet through Tomcat's HTTP port in one of
two ways:
  /tomcat-examples/servlet/MyNewServlet
or
  /tomcat-example/newserv

However, going through *Apache*, I can only use the first one, because
tomcat-auto tells Apache to only forward requests to Tomcat if it sees
something ending in *.jsp or something with "servlet" in the path.

So, my question is: shouldn't tomcat-auto also contain JkMount commands for
all servlets that I've mapped to paths in web.xml?

- Joe



RE: Should "tomcat-auto" do this?

Posted by Filip Hanik <ma...@filip.net>.
>So, my question is: shouldn't tomcat-auto also contain JkMount commands for
>all servlets that I've mapped to paths in web.xml?

nope, you have to set this up yourself

JkMount /tomcat-example/newserv ajp12

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
filip@filip.net
www.filip.net

> -----Original Message-----
> From: Joe Emenaker [mailto:joe@emenaker.com]
> Sent: Monday, April 02, 2001 6:02 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Should "tomcat-auto" do this?
>
>
> When I run Tomcat, it auto-generates an include file for Apache called
> "tomcat-auto". It uses a directive called "JkMount" to redirect certain
> URL's to Tomcat's non-http interface. For example, my "tomcat-examples"
> webapp yields a couple of entries that look like:
>
>    JkMount /tomcat-examples/servlet/* ajp12
>    JkMount /tomcat-examples/*.jsp ajp12
>
> So that anything beginning with "/tomcat-examples/" and ending in
> ".jsp" or
> anything beginning with "/tomcat-examples/servlet" will get redirected to
> Tomcat.
>
> Okay.... fine. However, I can define other servlet mappings in the web.xml
> file that don't get reflected in tomcat-auto. For example,
> suppose I made a
> servlet called MyNewServlet.class and put it into tomcat-examples. Let's
> also suppose that I mapped that to the path "newserv" in my web.xml.
>
> If I do this, I can get to the servlet through Tomcat's HTTP port
> in one of
> two ways:
>   /tomcat-examples/servlet/MyNewServlet
> or
>   /tomcat-example/newserv
>
> However, going through *Apache*, I can only use the first one, because
> tomcat-auto tells Apache to only forward requests to Tomcat if it sees
> something ending in *.jsp or something with "servlet" in the path.
>
> So, my question is: shouldn't tomcat-auto also contain JkMount
> commands for
> all servlets that I've mapped to paths in web.xml?
>
> - Joe
>
>
>