I have two or three web applications that use JavaMail.  I develop on a
Macintosh then drop the WAR files on Tomcat running on a Red Hat Linux
system.  In each case it was sufficient to put the JAR files in
WEB-INF/lib.  My web.xml files do not contain any <resource-ref> tags. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Friday, March 23, 2007 2:51 AM
To: users@tomcat.apache.org
Subject: JavaMail + Tomcat

Hi,

Regarding JavaMail:
Is it possible to put the mail.jar (and activation.jar) in the web 
application's WEB-INF/lib folder instead of tomcat's common/lib?

I did have it working in common/lib but then moved it to 
[web-app]/WEB-INF/lib - due to requirements - and I now get the
following 
error:
java.lang.NoClassDefFoundError: javax/mail/Session

on the line: 
session = (Session) envCtx.lookup("mail/Session");

The web.xml looks like this - I have also tried putting the mail.jar and

activation.jar on the projects classpath.

<resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>

Thanks,

Matt 
 

______________________________________________________________________
Confidentiality Notice:  The information in this e-mail and any
attachment(s) is confidential and for the use of the addressee(s) only.
If you have received this e-mail in error, please delete this e-mail.
Unauthorized use, reliance, disclosure or copying of the contents of
this e-mail, or any similar action, is prohibited.

This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to