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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to