Hi everyone,
I have the following problem:
My web application is loading a Servlet on start-up. This servlet
initializes the web-application's environment inside the
init(ServletConfig config) method. Now, at this point in time I'd like
to dynamically get the web-app's context path. Unfortunately the
ServletContext doesn't have the getContextPath() method in servlet
specification 2.4 only in 2.5. And since the init(...) method doesn't
have a HttpServletRequest I have no chance of retrieving the servlet's
context path at initialization time??
Any suggestions on that??
Thanks,
Steffen
Arne Vajhøj - 29 Mar 2007 01:53 GMT
> My web application is loading a Servlet on start-up. This servlet
> initializes the web-application's environment inside the
[quoted text clipped - 6 lines]
>
> Any suggestions on that??
ctx.getServletContextName()
or
ctx.getRealPath("/")
maybe.
Arne