Hello,

I'm aware (or at least, I assume!) that some of the people on this list are
involved in developing the specs for the Servlet API.

It would be useful to be able to obtain information about the servlet
context's name (or specifically, it's URL prefix) during initialisation
(either in a servlet's init() method, or in session or context event
listeners), for example to know that all servlets in the context will be
prefixed with "/mycontext" for example.

It's useful for preparing resources in quite a few cases, but at present,
I can only obtain this info from the ServletRequest (and that's "too late",
or at least very tricky to handle or synchronise).

I know that there's a method on ServletContext called
"getServletContextName", but that returns the value of the <display-name>
element in the deployment descriptor, not the URI mapping.

Hopefully someone can put this idea forward for inclusion in Servlet2.4 (the
next one, isn't it?).

Thanks,
-Chris B.




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

Reply via email to