You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by NY...@aol.com on 2004/07/02 18:22:53 UTC

How to use getServletConfig().getInitParameter()

I am having problems using the servlet.xml paramter specification, and I  was 
hoping somebody could help. I put the INIT-PARAM in the Tomcat version of  
servlet.xml. . . not in the Axis/Web-Inf version. Furthermore, I call it the  
following way:
 
import javax.servlet.http.HttpServlet;
 
public class AdminDirectBindingImpl extends  javax.servlet.http.HttpServlet
 
{
.
.
.
String ho =  getServletConfig().getInitParameter("accounts_db_dir");
System.err.println(ho);
file_base = new  File(getServletConfig().getInitParameter("accounts_db_dir") 
+ "admins\\" +  this_user);
 
}
 
This throws a nullPointerException. . .
 
Thanks in advance,
James