tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Horvath" <horzs...@mail.tiszanet.hu>
Subject Re: How to pass init parameter to a JSP
Date Tue, 17 Jul 2001 10:38:57 GMT
...
<%! String variable = "";%>

<% variable = getServletContext().getInitParameter("variable");%>
The value is: <%=variable%>

...
----- Original Message ----- 
From: "Simon Chan" <simon@rawmart.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, July 17, 2001 12:24 PM
Subject: How to pass init parameter to a JSP


> Hi,
> 
> How to pass initial parameters to a JSP?  I know how to pass initial
> parameters to a servlet via web.xml file (<init-param>). However, I
> don't know where to put for JSP.  This is my JSP file
> 
> ...
> <%
>     String c = config.getInitParameter("cfg");
> ...
> 
> 
> Thanks in advance
> 
> 
> skc
> 
> 
> 


Mime
View raw message