tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renee Petris <>
Subject jsp and config.getInitParameter()
Date Thu, 08 Feb 2001 04:43:33 GMT
Has anybody had success using config.getInitParameter() in jsp pages?
I was looking at the web.dtd and noticed that the the servlet element is
defined as:
<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
(servlet-class|jsp-file), init-param*, load-on-startup?,

jsp-file is described as: 

<!-- The jsp-file element contains the full path to a JSP file within

the web application. -->

Based on how init-param is used for servlets, I assumed that for a jsp page
the web.xml would look like:

<web-app>    <servlet>
            <param-value>This Is It</param-value>
    </servlet> </web-app>

Then in my jsp page I use:

<p>The config param test is <%= config.getInitParameter("test") %></p>

The output is

The config param test is null

I've gotten context-param to work great. But I'm curious if anyone knows how
to get config.getInitParameter("xx") to work?

Renée Petris
Overseer of the Execution
Loudeye Technologies <> 
414 Olive Way, Suite 300
Seattle, WA 98101
206-832-4500 phone
206-832-4475 fax 


View raw message