You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by TO...@LILLY.COM on 2002/08/13 18:32:05 UTC
Access Parameter
Can I use something like this in my jsp page (instead of a java sevlet) to
get the parameter name?,
before that I set the parameter in my web.xml file like this:
<context-param>
<param-name>parameter name</param-name>
<param-value>localhost</param-value>
</context-param>
String value = getServletContext().getInitParameter("parameter name");
is it only works in a sevlet or will it work in a jsp page too???
thanks again
Alex Tomita
Re: Access Parameter
Posted by Cédric Viaud <ce...@matrasi-tls.fr>.
As JSP are "compiled" as servlets, you can do with JSP everything you can do
with servlets.
Check for the exact syntax.
Regards,
Cédric
----- Original Message -----
From: <TO...@LILLY.COM>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, August 13, 2002 6:32 PM
Subject: Access Parameter
> Can I use something like this in my jsp page (instead of a java sevlet) to
>
> get the parameter name?,
> before that I set the parameter in my web.xml file like this:
>
> <context-param>
> <param-name>parameter name</param-name>
> <param-value>localhost</param-value>
> </context-param>
>
> String value = getServletContext().getInitParameter("parameter name");
>
> is it only works in a sevlet or will it work in a jsp page too???
>
> thanks again
> Alex Tomita
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>