How to deploy a servlet that includes javax.mail.* on Tomcat?

John Zukowski

Just place the mail.jar and activation.jar files (and possibly the pop.jar file if you are using POP3) in the CLASSPATH of the web server. The simplest way to do this is to rely on the Java extensions framework. Add them to the JAVA_HOME/jre/lib/ext directory. Just copy the files there. Otherwise, set the CLASSPATH environment variable before starting Tomcat. The startup scripts retain the existing CLASSPATH, adding the Tomcat-specific stuff to the end.

See What do I need to acquire in order to get started with JavaMail? to see where to get these files.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact