tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Curwen" <mi...@gb-im.com>
Subject RE: possibly off topic: workers2.properties question
Date Tue, 17 Jun 2003 16:39:18 GMT
Except you don't 'serve' them from that directory, you invoke them,
right?

>From your document here:
http://www.johnturner.com/howto/mod_jk_conf.html

<snip>
JkMount /examples/jsp/security/protected/j_security_check ajp13
JkMount /examples/CompressionTest ajp13
JkMount /examples/SendMailServlet ajp13
JkMount /examples/servletToJsp ajp13
JkMount /examples/snoop ajp13
JkMount /examples/*.jsp ajp13
JkMount /examples/servlet/* ajp13
</snip>

Here we see the two mappings you mention, but in this case /servlet/* is
the 'invoker servlet' and not a directory named 'servlet' (or is it ?).
The invoker of course is disabled in Tomcat 4.1.12 and above.  Many
sources tell us that /servlet was a convenience, and properly mapping
your servlets is a preferred way to invoke servlets.  So fine. I have a
dozen servlets, none of which can be "gotten to" by saying
"/servlet/servletClassName".

So one advantage of having a ! mapping is that I won't need to restart
Tomcat every time I add a servlet, so that this file (the one I snipped
above) will get re-generated. And then re-start apache to pick up that
file's changes.
 
Please correct any misunderstandings, I get confused easily. ;)

> -----Original Message-----
> From: John Turner [mailto:tomcat-user@johnturner.com] 
> Sent: Tuesday, June 17, 2003 11:20 AM
> To: Tomcat Users List
> Subject: Re: possibly off topic: workers2.properties question
> 
> 
> 
> You don't have to use the Invoker...my point was that 
> typically (at least 
> from what I have seen) people put their publicly accessible 
> servlets in one 
> place.  If they're all in one place, and typically there 
> aren't any other 
> types of files sitting in the servlets directory other than 
> servlets, you 
> can use a mapping like "/app/servlet/*" as a way of telling 
> Tomcat "handle 
> all requests for that folder".
> 
> Another example, such as the case with struts, is to use 
> something like 
> "/*.do" to handle servlets.
> 
> John
> 
> On Tue, 17 Jun 2003 11:04:26 -0500, Mike Curwen 
> <mikec@gb-im.com> wrote:
> 
> > Maybe I'm missing something, but I'm not using Tomcat's servlet 
> > invoker. So I don't have a single 'some-string-here' (ie /servlet) 
> > that I can use. Or do I?
> >
> >> -----Original Message-----
> >> From: John Turner [mailto:tomcat-user@johnturner.com] 
> Sent: Tuesday,
> >> June 17, 2003 11:00 AM
> >> To: Tomcat Users List
> >> Subject: Re: possibly off topic: workers2.properties question
> >>
> >>
> >>
> >> Sure, that could be done, but I honestly don't see the value. The 
> >> only
> >> way this is "better" or "easier" is if you have your 
> servlets spread out 
> >> all over the place.  Otherwise, you can handle everything 
> you need with 
> >> two mappings:
> >>
> >> /app/*.jsp
> >> /app/some-string-here/*
> >>
> >> Since Tomcat doesn't "do" anything with any other type of file, and
> >> since Apache is perfectly capable of handling every other 
> file type 
> >> besides JSP and servlet, what's the need for more 
> functionality?  I'm 
> >> not arguing, just wondering what the advantage is.
> >>
> >> John
> >>
> >> On Tue, 17 Jun 2003 10:23:02 -0500, Mike Curwen <mikec@gb-im.com> 
> >> wrote:
> >>
> >> > This is something that's on the horizon for me, and I know what 
> >> > I'll >
> >> end up doing is using that automated method of configuring 
> mod_jk.  >
> >> Tomcat will start and create a file that contains a > 
> >> uri:webappname/servletname mapping for each servlet mapped 
> in web.xml > 
> >> for all webapps.  Then in apache, you just include this 
> file. But I've > 
> >> often thought it would be very cool to NOT have to do it 
> this way, and > 
> >> instead have a 'Not' type mapping from apache.  In this 
> way, I could > 
> >> specify something like:
> >> >
> >> > [uri:!/app/images]
> >> > and
> >> > [uri:!/app/css]
> >> >
> >> > And then have everything *else* sent to Tomcat.
> >> >
> >> > Is this a huge pipe dream?  Aside from the fact that 
> this is not >
> >> currently implemented, can anyone see anything theoretically or >
> >> practically wrong with an approach such as this one?
> >> >
> >> >
> >> > -----Original Message-----
> >> > From: Mark Eggers [mailto:its_toasted@yahoo.com] Sent: Tuesday, 
> >> > June >
> >> 17,
> >> > 2003 10:16 AM
> >> > To: Tomcat Users List
> >> > Subject: Re: possibly off topic: workers2.properties question
> >> >
> >> >
> >> > Steve,
> >> >
> >> > You would single out what you wish to have Tomcat
> >> > handle, and then Apache would handle the rest.
> >> >
> >> > For example:
> >> >
> >> > [uri:/app/*.jsp]
> >> > worker=ajp13:localhost:8009
> >> >
> >> > [uri:/app/servlet/*]
> >> > worker=ajp13:localhost:8009
> >> >
> >> > would send all files ending in .jsp and all files underneath the 
> >> > /app/servlet uri to Tomcat.  Everything else underneath the /app 
> >> > uri would be served by Apache.
> >> >
> >> > Theoretically it is possible to be more fine-grained
> >> > with perl-compatible regular expressions, but I've not 
> experimented 
> >> > >
> >> with this.
> >> >
> >> > HTH
> >> >
> >> > /mde/
> >> > just my two cents . . . .
> >> >
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> 
> 
> 
> -- 
> Using M2, Opera's revolutionary e-mail client: 
> http://www.opera.com/m2/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message