Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes javamail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "javamail" Watch "javamail" New topic
Author

javamail

Sankar Subbiramaniam
Ranch Hand

Joined: Oct 03, 2000
Posts: 116
Hi,
I downloaded JavaMail and JAF. Unzipped archive file and included the mail.jar and activation jar in my classpath. Still when i compile, i am getting the error, package javax.mail and javax.mail.internet not found in internet. Am i missing anything ?
I even tried copying bothe the jar files into the directory where i have my source code and did the compilation. It failed again ? Please help.
Sankar
Sankar Subbiramaniam
Ranch Hand

Joined: Oct 03, 2000
Posts: 116
Its working. I reboot my machine and did the same process. Able to compile ???
Thanks
sangam
C. C. Lai
Greenhorn

Joined: Feb 22, 2004
Posts: 1
Tomcat is a complete web server written in Java that provides support for the Servlet and JSP specifications. Tomcat is developed as a part of the Apache Jakarta Project. Both binaries and source are available from the Jakarta web site.
To run the JavaMailServlet, you must add the JavaMail and JavaBeans Activation Framework jar files to the lib directory under the directory in which you installed Tomcat. This will cause Tomcat to include these jar files in its classpath automatically. (Some packages of Tomcat version 4 include JavaMail support.) Depending on the version of Tomcat used, the mail.jar and activation.jar files should be copied to the lib directory or to an appropriate subdirectory of the lib directory.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
incorrect advise above!
It used to be correct but since Tomcat 4 all libraries should be specific per web app and not stored at server level.
Mind that there is a bug in Tomcat 4.0x that can cause leakage between web applications and jars in the server lib directory. This can cause the server to fail to start properly if you have for example a newer version of Xerces in a webapp lib path, but this is specifically NOT correct behaviour.


42
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: javamail