I have looked at the JavaDocs, but I can't find a method that will give me
the context path for a web app:

(i.e. <Context path="/abcxyz" docBase="...)  All I want is the "/abcxyz"
string precisely as defined in the context tag.

I have tried getPath() from the servletContext, but it returns part of the
host name as well.  That doesn't make sense either, but that's the way it's
working for me... It returns "jndi:" for the protocol (???) Am I doing
something else wrong here?

I found the getServletContextName() method.  But that is an optional
parameter on the context tag, and I can't risk using something that might
not be defined.

I'm currently parsing up the URL object returned from
servletContext.getResource("/");  But this is a hack.  Surely there is a
better way to get the root URL context for a web app... (?)

Suggestions??  (BTW... Tomcat 5.5.7)

Thanks.

Jerry




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to