tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bernd pier <berndp...@arcor.de>
Subject Re: how to change this example JSP and servlet?
Date Thu, 24 Jul 2003 11:44:13 GMT
hi tommy,
what you see is the html side of the servlet. you can go to 
tomcat/webapps/examples/WEB-INF/classes there you`ll find the 
SendMailServlet. you`ll see to files one end with .java and one with 
.class. when you open the .java file you`ll see the source of the java 
serlvet which you can edit and change and do anything to it you like. 
you can open the java file with any editor or with an IDE.
i prefer netbeans, no matter you can use jbuilder or something else, but 
netbeans is free and has tomcat build in.
hope that helps a little bit.
 bernd
tommy stone schrieb:

>Hi..  I have a example JSP javamail page..  the sendmail.jsp (see below for the full syntax),
it prompt us to input 1)From which email 2)To which email 3)Subject 4) Content
> 
>But now, I want to fix , it can only send to my email   XXX@yahoo.com, how do I fix it??
See below, the point to SendMailServlet and the parameter is "mailto".  It will pass the "mailto"
to the SendMailServlet?  Where can I fix it to make to send only to XXX@yahoo.com??  Should
I change the SendMailServlet?  But how do I change the SendMailServlet? I can't even see the
content!!  Please teach me!!    
> 
><form method="POST" action="../../SendMailServlet">
>
><input type="text" name="mailto" size="60">
>
>-------Content of the Javamail JSP  -->sendmail.jsp---------------------------------------------
><html>
><head>
><title>Example Mail Sending Form</title>
></head>
><body bgcolor="white">
><p>This page will send an electronic mail message via the
><code>javax.mail.Session</code> resource factory that is configured into
>the JNDI context for this web application.  Before it can be used
>successfully, you must take note of the following:</p>
><ul>
><li>The default configuration assumes that there is an SMTP server running
>    on <strong>localhost</strong>.  If this is not the case, edit your
>    <code>conf/server.xml</code> file and change the value for the
>    <code>mail.smtp.host</code> parameter to the name of a host that provides
>    SMTP service for your network.</li>
><li>The application logic assumes that no user authentication is required
>    by your SMTP server before accepting mail messages to be sent.</li>
><li>All of the fields below are required.</li>
></ul>
><form method="POST" action="../../SendMailServlet">
><table>
>  <tr>
>    <th align="center" colspan="2">
>      Enter The Email Message To Be Sent
>    </th>
>  </tr>
>  <tr>
>    <th align="right">From:</th>
>    <td align="left">
>      <input type="text" name="mailfrom" size="60">
>    </td>
>  </tr>
>  <tr>
>    <th align="right">To:</th>
>    <td align="left">
>      <input type="text" name="mailto" size="60">
>    </td>
>  </tr>
>  <tr>
>    <th align="right">Subject:</th>
>    <td align="left">
>      <input type="text" name="mailsubject" size="60">
>    </td>
>  </tr>
>  <tr>
>    <td colspan="2">
>      <textarea name="mailcontent" rows="10" cols="80">
>      </textarea>
>    </td> 
>  </tr>
>  <tr>
>    <td align="right">
>      <input type="submit" value="Send">
>    </td>
>    <td align="left">
>      <input type="reset" value="Reset">
>    </td>
>  </tr>
></table>
></form>
></body>
></html>
>
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message