You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Soefara Redzuan <so...@hotmail.com> on 2002/07/25 05:18:37 UTC
RE: context-param for a list/array of values ?
>From: "Shapira, Yoav" <Yo...@mpi.com>
>Subject: RE: context-param for a list/array of values ?
>
>Howdy,
>There are a couple of ways. My favorite is:
>
><param-name>jndi.resources</param-name>
><param-value>jndi/a,jndi/b,jndi/c</param-value>
>
>String jndiString =
>getServletContext().getInitParameter("jndi.resources");
>StringTokenizer st = new StringTokenizer(jndiString, ",");
>ArrayList jndiResources = new ArrayList();
>
>while(st.hasMoreTokens())
>{
> jndiResources.add(st.nextToken());
>}
>
>That's it, very simple. ;)
Oh my, now why didn't I think of that ? :)
I had thought there would be something like request.getParameterValues()
which allows us to detect an array of values.
Ex. a fictional getServletContext().getInitParameterValues()
Looks like I'll have to go with the String split instead :-)
Thank you, Yoav.
Soefara.
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>