tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tommy stone <asktom...@yahoo.com>
Subject Re: how to change this example JSP and servlet?
Date Fri, 25 Jul 2003 02:12:58 GMT
Hi..Bernd and Dear All,

I found the "mailto" parameter in the source as shown
below. 
String from = request.getParameter("mailfrom");
String to = request.getParameter("mailto");

Now, I don't want the mailto parameter that obtain
from the sendmail.jsp, I want to fix to XXX@yahoo.com.
How should I fix it?
String to = XXX@yahoo.com 
or 
String to =request.getParameter("XXX@yahoo.com");
or etc?

After I change the SendMailServlet.java, how do I
compile to get new SendMailServlet.class file??

Thanks a lot!!

bernd pier <berndpier@arcor.de> wrote: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!! 
> 
>
>
> [input] 
>
>-------Content of the Javamail JSP
-->sendmail.jsp---------------------------------------------
>
>
>
>
>
>
This page will send an electronic mail message via the
>javax.mail.Session 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:

>
>
   The default configuration assumes that there is an
SMTP server running
> on localhost. If this is not the case, edit your
> conf/server.xml file and change the value for the
> mail.smtp.host parameter to the name of a host that
provides
> SMTP service for your network.
>
   The application logic assumes that no user
authentication is required
> by your SMTP server before accepting mail messages
to be sent.
>
   All of the fields below are required.
>

>
>
> 
> 
> Enter The Email Message To Be Sent
> 
> 
> 
> From:
> 
>  [input] 
> 
> 
> 
> To:
> 
>  [input] 
> 
> 
> 
> Subject:
> 
>  [input] 
> 
> 
> 
> 
> <br>>      
> 
> 
> 
> 
>  [input] 
> 
> 
>  [input] 
> 
> 
>
>
>
>
>
>
>
>---------------------------------
>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



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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