You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by chris brown <de...@reflexe.fr> on 2002/05/21 15:46:04 UTC

Spec change: getting servlet context name / url prefix during init

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Spec change: getting servlet context name / url prefix during init

Posted by "Craig R. McClanahan" <cr...@apache.org>.
The feedback address for comments on the Servlet Specification is printed
on the cover page of the spec itself:  "servletapi-feedback@eng.sun.com".
This message has been cc'd to the feedback address.

Servlet 2.4 is indeed the next version -- it is in the Community Review
stage of the JCP process at the moment, so that all JCP members can see it
and comment on it.

Craig


On Tue, 21 May 2002, chris brown wrote:

> Date: Tue, 21 May 2002 15:46:04 +0200
> From: chris brown <de...@reflexe.fr>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: Spec change: getting servlet context name / url prefix during
>     init
>
> 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:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>