Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java mail api

 
Sree Kumari
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i try to compile an javamail application using tomcat5 the error message is as follows.I have set the classpaths also


Unable to compile class for JSP

An error occurred at line: 9 in the jsp file: /MailExample.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\jakarta-tomcat-5.0.16\work\Catalina\localhost\examples\org\apache\jsp\MailExample_jsp.java:7: package javax.mail does not exist
import javax.mail.*;etc----

The problem seems to be of the classpath.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The problem seems to be of the classpath

Correct. The JavaMail jar files need to be in the classpath. In the case of a WebApp that is usually in WEB-INF/lib.
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apart from what Paul has mentioned in his post, include the pop3.jar, jmail.jar, mailapi.jar and activation.jar in the classpath.

Rgds,

Seetesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic