tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Chamberlin" <ma...@easystreet.com>
Subject getServletConfig returning null
Date Sun, 16 Feb 2003 22:33:12 GMT
Hello
I am trying to understand how servlet configuration and initialization parameters work and
am running into a difficulty in Tomcat
Version 4.1.18  I have the following configuration in in web.xml file -

<servlet>
<servlet-name>StarChartServlet</servlet-name>
<servlet-class>starchart.StarChartServlet</servlet-class>
<init-param>
<param-name>starChartWorkingDirectory</param-name>
<param-value>C:\temp\</param-value>
</init-param>
</servlet>

In the servlets init method, I have the following code:

try {
starChartWorkingDirectory = getServletConfig().getInitParameter("starChartWorkingDirectory");
} catch (java.lang.Exception ie) {
System.out.println("Init Exception = " + ie.toString());
}

and I am getting a null pointer exception thrown here...  Nothing else appears to be wrong
in the log files and the servlet does
function except for this issue.  Any help and guidance would be much appreciated! Thanks...

     Marc...

---------------------------------------------------------------------
Do you think the software industry will ever make software
that is as easy and reliable for a user to use
as the automobile industry makes a car easy and reliable
 for a user to drive?
------------------------------------------------------------------------
A man said unto the universe -  "Sir, I exist!"
"However," replied the universe  "I do not see where that creates in me a sense of an obligation."
          - Stephen Crane



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message