• Post Reply Bookmark Topic Watch Topic
  • New Topic

Facing problem to send mail using javamail api without authentication  RSS feed

 
dhaval thakor
Ranch Hand
Posts: 53
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


According code given above i am getting following error . please help me to solve this problem.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yet another reason why you shouldn't put Java code in a JSP. Based on the compiler message, it appears that the variable named "session" has already been declared. Either you did that, or (more likely) the "session" variable is one which is built into every JSP.

The straightforward solution would of course be to just call your "session" variable something else. But the proper solution would be to take that code out of the JSP entirely and put it in a servlet, or a helper class, or some other Java class.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!