• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

tomcat mail/session problem

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what do you mean by "crash"?
 
John L�ssig
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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! )
 
reply
    Bookmark Topic Watch Topic
  • New Topic