I am developing a servlet which will send email... i am calling a java class from that servlet which will take care of sending the mail. But when i am trying it as standalone its working fine, but trying from a servlet its giving problem like throwing . Javax.activation.DataSource class is not found. But i have added all the jars required for that.. incuding javax.action.*
What may be the problem??
Thaks and regards in advance... [ May 14, 2008: Message edited by: Bear Bibeault ]
i have done that also ,not only i added that jar to web-inf lib but also to tomcat lib....... but at the last same problem................ it is giving exception at this line...........
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extermely hard to read and many people that might be able to help you will just move along. Please read this for more information.
You can go back and change your post to add code tags by clicking the .
It would be helpful if you can post the code which you have used.
If the original poster is having a problem with a class not found exception, and has already stated that his code is working in a stand alone application, how would posting his code help?
The three jars needed to send mail with your code are activation.jar, mailapi.jar and smtp.jar. Of these 3 jars only activation.jar contains javax.activation.DataSource.
Hence kindly ensure you have copied it in the correct WEB-INF/lib. [There may be a chance you are copying it into yet another web application's WEB-INF/lib.