Hello.

I wrote jspInit() method to get initial parameter from web.xml file.
The JSP page contains this:

<%!
    public void jspInit() {
         ServletContext c = getServletContext();
         String  data = (String)c.getInitParameter("name");

    }
%>


and web.xml file contains this:

<servlet>
<servlet-name>
  test
</servlet-name>
<jsp-file>
    /test.jsp
</jsp-file>
<init-param>
<param-name>name</param-name>
<param-value>value</param-value>

</init-param>

</servlet>

But, the JSP page can't get the initial parameter data.

I don't know what is the problem. Please help me.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to