Re: Need help to send email with servlet

Lambok Sianturi <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
Jose,
actually i've add that portion to server.xml also. But still i got the same
exception. :(

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
----- Original Message -----
From: "Jose Alfonso Martinez" <[email protected]>
To: <[email protected]>
Sent: Thursday, January 08, 2004 2:00 PM
Subject: Re: Need help to send email with servlet


> 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
>
>

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.