Thanks, Randy.

I think this will work. I thought of doing this, but thought that there must
be an existing method for extracting this information. This solution, though
workable, seems like a kludge. Is Apache's concept of 'contexts' spec'd? If
so, doesn't it seem logical that there should be a way of determining what
the 'context' is separate from the 'servlet', and visa versa, without
resorting to custom string parsing?

Anyway, back to work. Again, thank you for your help.

    - mbi
======================================================
Mark Indictor -- Site2 Corporation
[EMAIL PROTECTED]
<http://www.site2.com>
Phone:(310)451-3472 FAX:(240)220-6341
http://keyserver.pgp.com/pks/lookup?op=get&search=0x8959F966
====================================================== 



-----Original Message-----
From: Randy Layman [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 10:33 AM
To: 'Tomcat Users List'
Subject: RE: REPOST: Please HELP!: URL Mapping Problems in servlet



        I think that this approach is very close to what you want.  Instead
of lastIndexOf("/") you could do lastIndexOf (or indexOf) getServletName.
Another alternative would be to use lastIndexOf(getPathInfo()) on the
request URI.

        As to why the methods return what they do, its because the spec says
so.  

        Randy

Reply via email to