I'm getting started using Jdeveloper 9i and can't get servlet init parameters in web.xml to be seen in init() via getInitParameter. I have a servlet mapping set up in web.xml as:
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>mypackage.MyServlet</servlet-class>
<init-param>
<param-name>param1</param-name>
<param-value>paramValue</param-value>
</init-param>
</servlet>
The init() method in MyServlet is simple:
public void init(ServletConfig config) throws ServletException
{
super.init(config);
String param = config.getInitParameter("param1"
;
}
Instead of getting "paramValue" returned, I get null. Is there something I'm missing (not understanding/configuring) in JDev 9i? I set the source path for the project to include the project's WEB-INF directory. I know the web.xml is being parsed because if I intentionally include syntax errors, JDev complains when it attempts to instantiate the server.
Thanks
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>mypackage.MyServlet</servlet-class>
<init-param>
<param-name>param1</param-name>
<param-value>paramValue</param-value>
</init-param>
</servlet>
The init() method in MyServlet is simple:
public void init(ServletConfig config) throws ServletException
{
super.init(config);
String param = config.getInitParameter("param1"
}
Instead of getting "paramValue" returned, I get null. Is there something I'm missing (not understanding/configuring) in JDev 9i? I set the source path for the project to include the project's WEB-INF directory. I know the web.xml is being parsed because if I intentionally include syntax errors, JDev complains when it attempts to instantiate the server.
Thanks