Lambok: You also have to add an entry under you <context> tag in server.xml. The one I use for my project is:
<Context path="" docBase="/usr/local/www/myproject" debug="0"> <!-- JavaMail --> <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/> <ResourceParams name="mail/Session"> <parameter> <name>mail.smtp.host</name> <value>localhost</value> </parameter> </ResourceParams> <!-- end JavaMail --> ... other context's definitions </Context> Jose On Tue, Jan 06, 2004 at 09:33:20AM +0700, Lambok Sianturi wrote: > Hi all, > i try to copy the servlet for sending email from Tomcat 4.0.4 example and use it in > our company technical support web application. > I have also add the > <resource-ref> > <res-ref-name>mail/Session</res-ref-name> > <res-type>javax.mail.Session</res-type> > <res-auth>Container</res-auth> > </resource-ref> > portion into the web.xml file. > > But when trying to running the send mail servlet i got this exception. > javax.naming.NameNotFoundException: Name java:comp is not bound in this Context > But sending email from the Tomcat example page itself is ok. Have i missed > something? Would anyone give any suggestion? > Thanks in advance. > > l a m b o k s i a n t u r i > - i t s t a f f - > pt. multi garmenjaya > j l . k r a w a n g n o 1 > b a n d u n g - i n d o n e s i a > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html