struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Could one figure out the context path in Servlet.init() method?
Date Thu, 31 Jul 2003 15:57:24 GMT

On Thu, 31 Jul 2003, Jing Zhou wrote:

> I am wondering if there is a way to get the context path without
> using init parameters during the initialization of a servlet.
> Any clues? We have ServletContext.getRealPath(), but not
> the ServletContext.getContextPath(). Why can't the ServletContext
> tell me its context path?

You are assuming that a web applicaton only has one context path.  That
does not have to be the case.

> Jing


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message