SWEET!
Gotta love user groups like this. Fixed up my local machine. Have to wait for the host
to recycle (once every hour 'til Enhydra is installed).
Now if I can just figure out how to write to a file on the server. I'm sure that is
some sort of permissions issue like last time....
Thanks Kitching!
Brad
On Wednesday, December 27, 2000, at 11:17 AM, Kitching Simon wrote:
> I can spot one problem with your web.xml file...
>
> An <init-param> can contain only one name/value pair.
> For passing multiple params to a servlet, use multiple
> init-param tags.
>
> This probably causes the smtpServer attribute you pass
> to the IridiumSendMail class to be null, hence the problem.
>
> Wrong:
> <init-param>
> <param-name>foo</param-name>
> <param-value>fooval</param-value>
> <param-name>bar</param-name>
> <param-value>barval</param-value>
> </init-param>
>
> Right:
> <init-param>
> <param-name>foo</param-name>
> <param-value>fooval</param-value>
> </init-param>
> <init-param>
> <param-name>bar</param-name>
> <param-value>barval</param-value>
> </init-param>
>
> For debugging problems like this, I can highly
> recommend using a decent LOGGING module,
> such as log4j (downloadable from sourceforge).
> This is easier than arranging bug reports to be
> emailed! (though log4j could be configured to
> email logged problems if desired...)
>
> Your website looks interesting - I presume it is a
> new web-hosting service. Is there any chance the
> service is going to be free??
>
> > -----Original Message-----
> > From: Brad Siegfreid [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, December 27, 2000 6:00 PM
> > To: [EMAIL PROTECTED]
> > Cc: Kitching Simon
> > Subject: RE: Servlet error I can't seem to resolve
> >
> > That was what I was thinking at first. I've gone back in and double
> > checked how I did it before.
> >
> > These are all placed in WEB-INF/lib:
> > FormEngineLight.jar
> > IridiumSendMail.jar
> > activation.jar (just redownloaded the latest, recompiled my files)
> > mail.jar (just redownloaded the latest, recompiled my files)
> >
> > the web.xml file contains the references to the FormEngineLight servlet. I
> > double checked that its picking up its init params by doing a test program
> > and comparing how it now grabs its params and that all worked fine.
> >
> > You can see what I have at:
> >
> > www.iridiumdesign.com/
> > FormEngineLight.java.txt
> > IridiumSendMail.java.txt
> > web.xml.txt
> >
> > The page that starts it all is contact.html
> >
> > Although I'm not an experienced programmer yet this stuff worked like a
> > charm under JServ. Any advice would be appreciated.
> >
> > Thanks,
> > Brad Siegfreid
> > Iridiumdesign
> >
> > On Wednesday, December 27, 2000, at 10:30 AM, Kitching Simon wrote:
> >
> > > The stack-trace seems pretty clear to me - the
> > > "sendIt" method of the IridiumSendMail class is
> > > storing a null pointer into a hashtable.
> > >
> > > What you may find is that the IridiumSendMail
> > > class is expecting to load a resource file from
> > > somewhere, but not finding it because you
> > > forgot to install it, or didn't install it in the
> > > right place.
> > >
> > > Just a note on the location of the "mail.jar"
> > > and "activation.jar" files - I think that the
> > > correct place for these is where you
> > > first had them, in the WEB-INF/lib
> > > directory within your web application.
> > > Placing jars in the classpath is
> > > generally a bad idea with tomcat
> > > (though quite a lot of tomcat users
> > > don't seem to understand this; presumably
> > > they are the same ones that would be
> > > using global variables under c++ :-)
> > >
> > > regards,
> > >
> > > Simon
> > > > -----Original Message-----
> > > > From: Brad Siegfreid [SMTP:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, December 27, 2000 5:21 PM
> > > > 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:49
> >
> > > > 9)
> > > > at
> > > > org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> >
> > > > at
> > > >
> > org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Htt
> >
> > > > pConnectionHandler.java:160)
> > > > at
> > > >
> > org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:3
> >
> > > > 38)
> > > > 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
> > >
> > >
>
>