Thanks for the clarification, Erik.
Erik Weber wrote:
I think you want ServletContext.getInitParameter here. That is used with
the "context-param" element (global to your web app).
ServletConfig.getInitParameter is used with the "init-param" element
(specific to one Servlet).
In addition to the
I think you want ServletContext.getInitParameter here. That is used with
the "context-param" element (global to your web app).
ServletConfig.getInitParameter is used with the "init-param" element
(specific to one Servlet).
In addition to the JavaDocs, you should read the Servlet specification,
MyServlet extends HttpServlet {
public void init (ServletConfig config) {
String paramValue = config.getInitParameter("myContextParamName");
}
}
Personally, I have found the JavaDocs invaluable for this kind of stuff;
you can find the Servlet 2.4 Javadocs online at
http://jakarta.apache.o
3 matches
Mail list logo