You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steven Garrett <St...@cometsystems.com> on 2003/06/17 16:51:41 UTC

possibly off topic: workers2.properties question

Hi,

I'm running mod_jk2, with apache 2.0.45 and tomcat 4.1.24.  In our
workers2.properties we've defined an application 

[uri:/app/*]
worker=ajp13:localhost:8009

but we have other things in that directory such as .html, .jpeg. .gif that
we don't want to have passed to tomcat and other directories underneath this
which we don't want to have exposed but are necesssary to the appication,
such as servlets with no file extension (don't ask, the developers are
crazy).  Is there a way to in the workers2.properties to exclude files, such
as .gif? I hope this makes sense.  

Thanks,

Steve

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


Re: possibly off topic: workers2.properties question

Posted by John Turner <to...@johnturner.com>.
Hi -

You don't exclude, you include.

Change "/app/*" to "/app/*.jsp" and "/app/servlet/*" or whatever.

John

On Tue, 17 Jun 2003 10:51:41 -0400, Steven Garrett 
<St...@cometsystems.com> wrote:

> Hi,
>
> I'm running mod_jk2, with apache 2.0.45 and tomcat 4.1.24.  In our
> workers2.properties we've defined an application
>
> [uri:/app/*]
> worker=ajp13:localhost:8009
>
> but we have other things in that directory such as .html, .jpeg. .gif 
> that
> we don't want to have passed to tomcat and other directories underneath 
> this
> which we don't want to have exposed but are necesssary to the appication,
> such as servlets with no file extension (don't ask, the developers are
> crazy).  Is there a way to in the workers2.properties to exclude files, 
> such
> as .gif? I hope this makes sense.
>
> Thanks,
>
> Steve
>
> ---------------------------------------------------------------------
> 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


Re: possibly off topic: workers2.properties question

Posted by Bill Barker <wb...@wilshire.com>.
If your version of Jk2 is recent enough, and was compiled with the Apache
regex library, then you should be able to do:
[uri:!/app/*.gif]

(of course you can always get more clever with regexps ;-).
I haven't actually tried it myself, but I'm told that it does work.

"Mark Eggers" <it...@yahoo.com> wrote in message
news:20030617151624.31115.qmail@web41510.mail.yahoo.com...
> 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 . . . .
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com




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


Re: possibly off topic: workers2.properties question

Posted by John Turner <to...@johnturner.com>.
Or do like struts and stick an extension on there.  Struts uses *.do.  Here 
are the JkMounts for an app running on 4.1.12 on Solaris, using struts:

    JkMount /myApp/*.do  ajp13
    JkMount /myApp/*.jsp  ajp13

At that point, AFAIK, Tomcat will use the URL mapping in web.xml to 
determine which actual servlet to execute.  So, if you have something like 
this in your URL:

http://some.host.com/myApp/ShoppingCart.do?some_queryString

then the JkMount would send it to Tomcat, and in your web.xml you'd have 
something like:

<servlet>
  <servlet-name>ShoppingCartServlet</servlet-name>
  <servlet-class>com.your.package.ShoppingCart</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>ShoppingCartServlet</servlet-name>
  <url-pattern>/myApp/ShoppingCart.do</url-pattern>
</servlet-mapping>

Or am I not understanding the goal?

John

On Wed, 18 Jun 2003 01:28:32 +0800, Jason Bainbridge <ja...@jblinux.org> 
wrote:

> On Wed, 18 Jun 2003 00:04, Mike Curwen 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?
>
> I guess a lot of people are in a similar situation to the one I am in 
> where the web application is completely composed of servlets so to 
> simplify the URL the servlets within the web.xml file are mapped to 
> exclude the servlet keyword eg:
>
> /webapp/servletName
>
> This as you have suggested isn't too friendly for jkMount statements as 
> there is no way to determine if it is a servlet or not, I guess the only 
> way around that is to change the mapping to include the servlet keyword.
>
> Regards,



-- 
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


RE: possibly off topic: workers2.properties question

Posted by Mike Curwen <mi...@gb-im.com>.
Ah, I think the lightbulb just went off.  I think I can do this?
	
<servlet-mapping>
  <servlet-name>EditObjectServlet</servlet-name>
  <url-pattern>/foo/editobject/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>ReportServlet</servlet-name>
  <url-pattern>/foo/reports/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>LoginServlet</servlet-name>
  <url-pattern>/foo/login/*</url-pattern>
</servlet-mapping>

Of course, right now I don't have the '/foo' in any of my url-patterns.
But if I put 'foo' there, I can ask the jkMount to map to 'foo'. Of
course, 'foo' is anything you want.  In this case, would I have to mount
to /foo/*  , as oppposed to just plain /foo* ?

Or make it easier than that, and as you suggest, prepend a token to the
servletname like:

<servlet-mapping>
  <servlet-name>LoginServlet</servlet-name>
  <url-pattern>/serLogin/*</url-pattern>
</servlet-mapping>


and map jkmount to /ser*   ?

> -----Original Message-----
> From: Jason Bainbridge [mailto:jason@jblinux.org] 
> Sent: Tuesday, June 17, 2003 12:29 PM
> To: Tomcat Users List
> Subject: Re: possibly off topic: workers2.properties question
> 
> 
> On Wed, 18 Jun 2003 00:04, Mike Curwen 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?
> 
> I guess a lot of people are in a similar situation to the one 
> I am in where 
> the web application is completely composed of servlets so to 
> simplify the URL 
> the servlets within the web.xml file are mapped to exclude 
> the servlet 
> keyword eg:
> 
> /webapp/servletName
> 
> This as you have suggested isn't too friendly for jkMount 
> statements as there 
> is no way to determine if it is a servlet or not, I guess the 
> only way around 
> that is to change the mapping to include the servlet keyword.
> 
> Regards,
> -- 
> Jason Bainbridge
> http://jblinux.org
> 
> ---------------------------------------------------------------------
> 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


Re: possibly off topic: workers2.properties question

Posted by Jason Bainbridge <ja...@jblinux.org>.
On Wed, 18 Jun 2003 00:04, Mike Curwen 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?

I guess a lot of people are in a similar situation to the one I am in where 
the web application is completely composed of servlets so to simplify the URL 
the servlets within the web.xml file are mapped to exclude the servlet 
keyword eg:

/webapp/servletName

This as you have suggested isn't too friendly for jkMount statements as there 
is no way to determine if it is a servlet or not, I guess the only way around 
that is to change the mapping to include the servlet keyword.

Regards,
-- 
Jason Bainbridge
http://jblinux.org

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


Re: possibly off topic: workers2.properties question

Posted by John Turner <to...@johnturner.com>.
No problem, the list can be a little glitchy sometimes.

John

On Tue, 17 Jun 2003 14:16:46 -0500, Mike Curwen <mi...@gb-im.com> wrote:

> Thanks for that John,
>
> I was getting this confused:
> "do I send this to Tomcat" != "which servlet is mapped to this URL"
> (I thought it was ==)
>
> I did reply a while back, to earlier emails, with "the lightbulb went
> off", but that email seems to have lost its way. Perhaps this one will
> work.
>
> Thanks again.
>
>
>
>> -----Original Message-----
>> From: John Turner [mailto:tomcat-user@johnturner.com] Sent: Tuesday, 
>> June 17, 2003 1:49 PM
>> To: Tomcat Users List
>> Subject: Re: possibly off topic: workers2.properties question
>>
>>
>>
>> The "invoker" servlet allows you to skip explicitly mapping your servlet 
>> in web.xml.
>>
>> The invoker is bad.  Explicit mapping is good.
>>
>> The /examples webapp uses the Invoker servlet.  Its an example.  You 
>> don't enable the /examples webapp in production, and with the JSP source 
>> disclosure vulnerability for the Invoker servlet, you shouldn't use the 
>> Invoker in production, either, even though lots of people do because its 
>> "easier".
>>
>> /examples/servlet/* is the Invoker only because the web.xml for 
>> /examples sets it up that way.  JkMount does not tell Tomcat which 
>> servlet to "serve"...web.xml does that.  JkMount just tells Apache which 
>> requests to send to Tomcat.
>>
>> "do I send this to Tomcat" != "which servlet is mapped to this URL"
>>
>> AFAIK (I've never tried it), you could keep "/examples/servlet/* ajp13" 
>> in httpd.conf, comment out the Invoker in web.xml, and then explicitly 
>> map every example servlet in web.xml, and the examples servlets would 
>> work, as long as <url-pattern></url-pattern> was something like 
>> "/examples/servlet/someServletName".
>>
>> John
>>
>> On Tue, 17 Jun 2003 11:39:18 -0500, Mike Curwen <mi...@gb-im.com> wrote:
>>
>> > 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 <mi...@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 <mi...@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


RE: possibly off topic: workers2.properties question

Posted by Mike Curwen <mi...@gb-im.com>.
Thanks for that John,

I was getting this confused:
"do I send this to Tomcat" != "which servlet is mapped to this URL"
(I thought it was ==)

I did reply a while back, to earlier emails, with "the lightbulb went
off", but that email seems to have lost its way. Perhaps this one will
work.  

Thanks again.



> -----Original Message-----
> From: John Turner [mailto:tomcat-user@johnturner.com] 
> Sent: Tuesday, June 17, 2003 1:49 PM
> To: Tomcat Users List
> Subject: Re: possibly off topic: workers2.properties question
> 
> 
> 
> The "invoker" servlet allows you to skip explicitly mapping 
> your servlet in 
> web.xml.
> 
> The invoker is bad.  Explicit mapping is good.
> 
> The /examples webapp uses the Invoker servlet.  Its an 
> example.  You don't 
> enable the /examples webapp in production, and with the JSP source 
> disclosure vulnerability for the Invoker servlet, you 
> shouldn't use the 
> Invoker in production, either, even though lots of people do 
> because its 
> "easier".
> 
> /examples/servlet/* is the Invoker only because the web.xml 
> for /examples 
> sets it up that way.  JkMount does not tell Tomcat which servlet to 
> "serve"...web.xml does that.  JkMount just tells Apache which 
> requests to 
> send to Tomcat.
> 
> "do I send this to Tomcat" != "which servlet is mapped to this URL"
> 
> AFAIK (I've never tried it), you could keep 
> "/examples/servlet/* ajp13" in 
> httpd.conf, comment out the Invoker in web.xml, and then 
> explicitly map 
> every example servlet in web.xml, and the examples servlets 
> would work, as 
> long as <url-pattern></url-pattern> was something like 
> "/examples/servlet/someServletName".
> 
> John
> 
> On Tue, 17 Jun 2003 11:39:18 -0500, Mike Curwen 
> <mi...@gb-im.com> wrote:
> 
> > 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 <mi...@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 
> <mi...@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


Re: possibly off topic: workers2.properties question

Posted by John Turner <to...@johnturner.com>.
The "invoker" servlet allows you to skip explicitly mapping your servlet in 
web.xml.

The invoker is bad.  Explicit mapping is good.

The /examples webapp uses the Invoker servlet.  Its an example.  You don't 
enable the /examples webapp in production, and with the JSP source 
disclosure vulnerability for the Invoker servlet, you shouldn't use the 
Invoker in production, either, even though lots of people do because its 
"easier".

/examples/servlet/* is the Invoker only because the web.xml for /examples 
sets it up that way.  JkMount does not tell Tomcat which servlet to 
"serve"...web.xml does that.  JkMount just tells Apache which requests to 
send to Tomcat.

"do I send this to Tomcat" != "which servlet is mapped to this URL"

AFAIK (I've never tried it), you could keep "/examples/servlet/* ajp13" in 
httpd.conf, comment out the Invoker in web.xml, and then explicitly map 
every example servlet in web.xml, and the examples servlets would work, as 
long as <url-pattern></url-pattern> was something like 
"/examples/servlet/someServletName".

John

On Tue, 17 Jun 2003 11:39:18 -0500, Mike Curwen <mi...@gb-im.com> wrote:

> 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 <mi...@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 <mi...@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
>
>



-- 
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


RE: possibly off topic: workers2.properties question

Posted by Mark Eggers <it...@yahoo.com>.
One of the ways you could accomplish the
/app/servlet/* mapping is to map each of your servlets
in the app's web.xml file with a:

    <servlet-mapping>
        <servlet-name>MyServlet</servlet-name>
        <url-pattern>/servlet/MyServlet</url-pattern>
    </servlet-mapping>

for each servlet in your app.  You would also have to
define something like:

<servlet>
  <servlet-name>MyServlet</servlet-name>
  <display-name>MyServlet</display-name>
  <servlet-class>org.someorg.app.Name</servlet-class>
</servlet>

This would map the class Name in package
org.someorg.app to MyServlet, and then the
servlet-mapping would map the MyServlet name to a uri.

According to the documentation, you may have more than
one servlet-mapping per servlet-name, but then the
Apache-Tomcat mapping might get a bit cumbersome.

Then the people who build the pages will have to refer
to the servlet with the proper uri . . . .

HTH

/mde/
just my two cents . . . .

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


RE: possibly off topic: workers2.properties question

Posted by Mike Curwen <mi...@gb-im.com>.
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 
> <mi...@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 <mi...@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


Re: possibly off topic: workers2.properties question

Posted by John Turner <to...@johnturner.com>.
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 <mi...@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 <mi...@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


RE: possibly off topic: workers2.properties question

Posted by Mike Curwen <mi...@gb-im.com>.
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 
> <mi...@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


Re: possibly off topic: workers2.properties question

Posted by John Turner <to...@johnturner.com>.
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 <mi...@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 . . . .
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
>
> ---------------------------------------------------------------------
> 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
>
>



-- 
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


RE: possibly off topic: workers2.properties question

Posted by Mike Curwen <mi...@gb-im.com>.
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 . . . .

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com

---------------------------------------------------------------------
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


Re: possibly off topic: workers2.properties question

Posted by Mark Eggers <it...@yahoo.com>.
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 . . . .

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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