File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes a newbie in need of urgent help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "a newbie in need of urgent help" Watch "a newbie in need of urgent help" New topic
Author

a newbie in need of urgent help

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
I need to design an Applet which will be placed in
a Lotus Notes email. This Applet is quite basic it will need to obtain employee info eg. name, phone# ect. At most a dozen fields. The email would then be sent to all employees and in turn when they would compile the form all info would be saved on SQL.
Im new to Servlets and Applets. My question in the end is this how would I "Post" this information to the Servlet to than pass to SQL. I know that I can extend the GenericServlet class but that class does not provide methods like the HttpServlet class such as doGet and doPost, for handling HTTP-specific services. Am i approaching this correctly? I really need to solve this. Thank you all for your time.
Ming Chen
Greenhorn

Joined: Mar 14, 2002
Posts: 13
The idea is you get user's entries through applet which provides html parameters. The parameters are then sent to servlet, the servlet can setup connection to database, insert user data to db. You can also let the servlet send email to anyone.
This is not so hard to implement. If you want servlet to send email, you need add a java mail server package downloadable from SUN.
For DB, you can use javabean or setup your own connection in servlet.
Good luck.
Ming
Sunny Liu
Ranch Hand

Joined: Mar 15, 2002
Posts: 63
Hi John
In your applet you open URLConnection to servlet then post data to servlet.
Your servlet extends HttpServlet, then you can overwrite doPost() or doGet() method to process request. use JDBC in your servlet and post data to Database.


If I am rich, I will spend more.<p>IBM 486 (OOAD & UML) & 141 (XML) passed<br />Oracle 1Z0-007 passed<br />MCSD MCDBA MCSE <br />SCJP SCSSA<br />CCNA CNA A+
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
It was my understanding that the doPost() method replies to POST requests from within an HTML document. My Applet is not sitting within an HTML document, it will be pasted within an email. So can I still do what you suggest. Thanks again for your time.
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
Sorry im also having a hard time understanding how parameters will be passed to doPost(). Eg.
I enter my name John Mattucci how will this information be passed from the Applet to the Servlet. Thank you all
Ming Chen
Greenhorn

Joined: Mar 14, 2002
Posts: 13
You can use add a send button on your applet to trigger and open URLConnection to servlet then then send parameters to servlet, it's exactly the same as you send parameters from html form. Please study documentation of java.applet.Applet and the related class to find those useful methods.
Ming Chen
SCJP2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: a newbie in need of urgent help