Howdy,

>         public void init(ServletConfig config) throws
ServletException{
>                 super.init(config);
>                 prefix = getServletContext().getRealPath("/");
>                 file = getInitParameter("log4j-init-file");
>                 System.out.println("Prefix: " + prefix);
>                 System.out.println("File: " + file);

1) It's a good idea to override the init() method, rather than the one
that takes a ServletConfig argument.  That way you don't have to call
super.init(config).

2) Are you deploying from a .war file?  If so, getRealPath("/") will
return null.

3) I've never had any problems getting init-params from web.xml.  I
suspect a lot of people would complain if tomcat was messing this up ;)


Are you sure the servlet whose code you posted is the one that gets
invoked?  What is the output from the two System.out.println()
statements in the code?

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to