• Post Reply Bookmark Topic Watch Topic
  • New Topic

tomcat mail/session problem

 
John L�ssig
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I'm trying to write a servlet, which sends email. I've installed tomcat 5.0 and use the JavaMail-API.
My program looks as follow:

Always when i try to to the session-setup (third line of the code-snippet), the program crashes ...
When i use the same program as a normal java-app, whitout tomcat, everythings work fine. I really guess, there is a cohesion with tomcat, because in the tomcat-admin may a mail-session be defined !!
Can anyone help me please?
thanks
flavio
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you mean by "crash"?
 
John L�ssig
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the following exception:

I looks like a classpath wouldn't be set properly, but I controlled everything....
Actually I include following .jar-Files: j2ee.jar, mail.jar, activation.jar all from the J2EE-SDK.
 
John L�ssig
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok ...... i got it:
i needed to copy mail.jar and activation.jar into the WEB-INF/lib directory ....

now, everythings work fine (after 10 hours! )
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!