You have to setup a context-param first in web.xml
<context-param>
<param-name>FOO</param-name>
<param-value>bar</param-value>
</context-param>
In jsp
String theFoo = application.getInitParameter("FOO");
R
On 7/22/02 11:46 AM, "Ken Barron" <[EMAIL PROTECTED]> wrote:
> Hi all
> This is a jsp question, hope its not considered off-topic:
> How do I get my jsp page to read an initialisation parameter from my config
> xml? I want to do the equivalent of the following Servlet method:
>
> public void init(ServletConfig config) throws ServletException {
> super.init(config);
> }
>
> So that in the processing of my jsp I can call the
> getInitParameter("paramName") method to get my param value.
>
> Can I just define the init method in the jsp page? Or is the reading of the
> init params from my xml config automatic?
>
> Thanks for any help
> Ken
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html