Sorry, see my CORRECTION below: ----- Original Message ----- From: "Frank Burns" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, May 20, 2004 4:19 AM Subject: How to read a parameter in web.xml from Action class
> Hi, > > From an Action class, I want to read a parameter specified in the web.xml > file. I thought I could place it in an <init-param> block, within the > <servlet-name>action</servlet-name> element, like this: > > <init-param> > <param-name>myParamName</param-name> > <param-value>myParamValue</param-value> > </init-param> > > and then read it within the Action class using: > > String paramValue = > request.getSession().getServletContext().getInitParameter("myParamValue"); CORRECTION: request.getSession().getServletContext().getInitParameter("myParamName"); > > But I get null. > > What am I doing wrong? > > Thanks, > > Frank. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]