You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2001/10/23 11:23:00 UTC

DO NOT REPLY [Bug 4362] New: - Cannot read init-params from within a JSP

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4362>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4362

Cannot read init-params from within a JSP

           Summary: Cannot read init-params from within a JSP
           Product: Tomcat 4
           Version: 4.0.1 Final
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Webapps
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: efussi@gmx.net


When I configure init-params in web.xml for a JSP like this:

<servlet>
  <servlet-name>Foo</servlet-name>
  <jsp-file>/foo.jsp</jsp-file>
  <init-param>
    <param-name>bar</param-name>
    <param-value>42</param-value>
  </init-param>
</servlet>

I cannot read them using the ServletConfig.getInitParameter() method. Using 
ServletConfig.getInitParameterNames() I found that I get the init-params from 
the 'jsp' page compiler servlet (org.apache.jasper.servlet.JspServlet in 
conf/web.xml) instead.