• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

E mail using JSP Error

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Adding to the above mail :

1)I have put the JAVAMAIL 1.4.4 folder in C:/ProgramFiles/JAVA folder and updated the path for the .jar files in classpath.
2)As i m developing in ECLIPSE i have also right clicked on project folder -->Properties-->Java Build Path -->Libraries Tab --> and added my mail.jar there through add external jars.

So now when i pasted the below code i did not see any red underlinings.
The code is :



When executing this i get the below error :



Why i m getting this error ?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like the mail.jar is not being included in the WAR deployed to Tomcat.
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And once you get that problem sorted out, you should read the JavaMail FAQ to find the right way to connect to Gmail. Your code is based on out-of-date examples which are still littering the internet.
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And has no one mentioned that putting complex code in a JSP is a really, really, really bad thing thing to do?

Or, for that matter, that this wasn't the best forum to ask that question. We do have a forum where the JSP experts hang out!
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Or, for that matter, that this wasn't the best forum to ask that question. We do have a forum where the JSP experts hang out!


Actually, I think this was the proper forum because I think that the question is: "How do I configure Eclipse properly to get the mail JAR into my WAR?"
reply
    Bookmark Topic Watch Topic
  • New Topic