Your props is a hashtable (its a java.util.Properties which extends
the java.util.Hashtable).  If I had to guess, your getInitParameter method
is not returning values.  This would cause your problem because the class
variables would then be null and then you try to put them into the
Properties object, causing the NullPointer.  I don't know why this method is
not returning values - your web.xml file looks correct to me, but I don't
use this so I could be wrong.  A thought, probably off base, you are calling
the servlet as /servlet/FormEngineLight from contact.html, but you set the
URL-Mapping and Servlet name as /FormEngineLight - maybe its not finding the
initialized servlet?

        Randy


-----Original Message-----
From: Brad Siegfreid [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 12:22 PM
To: [EMAIL PROTECTED]
Subject: RE: Servlet error I can't seem to resolve


I saw that. I figured that JavaMail wasn't loading or something. But I've
tried it with the mail.jar file in both the WEB-INF/lib directory and in the
classpath. I don't deal with any hashtable directly. The params that are
loading are going into FormEngineLight. I did a test program to make sure I
was loading initParameters correctly and it worked fine on my local machine
at least.

See a later message for the location of my source files.

Brad

--
On Wednesday, December 27, 2000, at 09:56 AM, Randy Layman wrote:

>  
>       If would seem that you are trying to put a null as either the key or

> value into a Hashtable.  This is happening in the IridiumSendMail's sendIt

> method.  Maybe a variable you expect to be in a session or application 
> object are not set?  Or some parameter file is not being loaded? 
>  
>       Randy 
>  
> -----Original Message----- 
> From: Brad Siegfreid [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, December 27, 2000 11:21 AM 
> To: [EMAIL PROTECTED] 
> Subject: Servlet error I can't seem to resolve 
>  
>  
> I have a simple form handling servlet (FormEngineLight) that connects to a

> email class (IridiumSendMail) that have been working with another host
under 
> JServ 1.0b3. I moved to a new host with Tomcat 3.2 and also now have
Tomcat 
> 3.2 working on a local machine for testing. Now my servlet/class combo
fails 
> to work in either location. They require mail.jar and activation.jar,
which 
> are in the classpath (initially just in the context lib directory, now in 
> the locations that load at boot). My apps are compiled agains Java 1.18
but 
> are running on 1.2 for both local and hosted. 
>  
> The stackTrace I get from FormEngineLight (emailed back using the 
> sun.net.smtp classes) is:  
>  
> java.lang.NullPointerException 
>       at java.util.Hashtable.put(Hashtable.java:381) 
>       at IridiumSendMail.sendIt(IridiumSendMail.java) 
>       at FormEngineLight.writeToIridiumSendMail(FormEngineLight.java) 
>       at FormEngineLight.sendConfirmation(FormEngineLight.java) 
>       at FormEngineLight.service(FormEngineLight.java) 
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
>       at 
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:499)

>       at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) 
>       at 
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC

> onnectionHandler.java:160) 
>       at 
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338

> ) 
>       at java.lang.Thread.run(Thread.java:479) 
>  
> Both of my files are in jars and reside in the lib directory. The 
> FormEngineLight servlet is accessible and sends me the error shown above. 
> Does the IridiumSendMail file have to be listed in the web.xml file even
if 
> its not a servlet. If so, do I list it as if it were a servlet? 
>  
> Thanks, 
> Brad Siegfreid 
> Iridiumdesign 
>  
>  

Reply via email to