You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Simon Chan <si...@rawmart.com> on 2001/07/18 03:34:29 UTC

Re: How to configure web.xml to setup init parameters for JSP

Hi,

However, I do not know how to configure web.xml to put init params for
JSP.  May I have a example? Many thx

skc

Zsolt Horvath wrote:

> ...
> <%! String variable = "";%>
>
> <% variable = getServletContext().getInitParameter("variable");%>
> The value is: <%=variable%>
>
> ...
> ----- Original Message -----
> From: "Simon Chan" <si...@rawmart.com>
> To: <to...@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
> >
> >
> >

--
Simon Chan, Senior System Analyst, Rawmart.com, Inc.
17/F MassMutual Tower, 38 Gloucester Rd, Hong Kong SAR, China
Tel: +852 2861-4564. Fax: +852 2865-3865. Email: simon@rawmart.com

http://www.rawmart.com , the next dimension in the trading of
raw materials, please register now.

An initiative of the Noble Group.  Please visit us at
http://www.thisisnoble.com



Re: How to configure web.xml to setup init parameters for JSP

Posted by John Hebert <jo...@vedalabs.com>.
Simon Chan wrote:

> Hi,
> 
> However, I do not know how to configure web.xml to put init params for 
> JSP.  May I have a example? Many thx
> 


Simon,

Take a look at the parameter initialization section in:

http://jakarta.apache.org/tomcat/tomcat-3.3-doc/appdev/web.xml.txt


Hope this helps!

-- 
John Alex Hebert
john@vedalabs.com
System Engineer