You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mr. Tomcat" <to...@mobile.mp> on 2002/09/19 04:33:27 UTC

Tags and init parameters?

With filter, servlets and listeners, it is possible to provide init
parameters in their config files.  This doesn't seem possible with
tags.  Is this true, or is there a way with Tomcat 4.1 to provide tags
some init parameters?  This seems better than compiling some values into
the tag staticly.  If not, I'll have to either compile them in or put
the init stuff into the servlet context.

Thanks for any tips.





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


Re: Tags and init parameters?

Posted by "Craig R. McClanahan" <cr...@apache.org>.
Use context init parameters to provide configuration information to tags.
Tags can access the ServletContext instance by calling
pageContext.getServletContext().

Alternatively, you could use <env-entry> values in web.xml and access them
via JNDI.

Craig


On 18 Sep 2002, Mr. Tomcat wrote:

> Date: 18 Sep 2002 16:33:27 -1000
> From: Mr. Tomcat <to...@mobile.mp>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Tags and init parameters?
>
> With filter, servlets and listeners, it is possible to provide init
> parameters in their config files.  This doesn't seem possible with
> tags.  Is this true, or is there a way with Tomcat 4.1 to provide tags
> some init parameters?  This seems better than compiling some values into
> the tag staticly.  If not, I'll have to either compile them in or put
> the init stuff into the servlet context.
>
> Thanks for any tips.
>
>
>
>
>
> --
> 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>