Hey!
First I am going to give you a rough plan, then I am
going to send you off to a source for more detailed
information. Steps below assumes you a little bit
about communicating with servlets.
Steps:
1) Establish you URLconnection and send your
applet's field strings to the servlet.
2) Retrieve them in the servlet and build your SQL
string using the passed in parameters.
3) Do your database transaction and process the results.
It's as simple as that.
There are many good tutorials on the web.
Search this E-list's archive
http://archives.java.sun.com/archives/servlet-interest.html
for URLs of these tutorials.
Sans adieu,
Danny Rubis
"S.A.Pamungkas" wrote:
> Hi all
>
> The applet code, for example :
> ......
> Panel west = new Panel();
> west.add(new Label("City : ", Label.Right);
> west.add(new Label("Hobby : ", Label.Right);
> add("West", west);
>
> City = new TextField();
> Hobby = new TextField();
> Panel center = new Panel();
> center.add(City);
> center.add(Hobby);
> add("Center", center);
> ......
> String cityTextFiled = getText(City);
> String hobbyTextFiled = getText(Hobby);
> .......
>
> In servlet I need to execute the SQL command like
> this:
> "SELECT NAME FROM MYTABLE WHERE CITY='TOKYO' AND
> HOBBY='FISHING'"
> But instead the above SQL command, I'll write the
> command as follow :
> "SELECT NAME FROM MYTABLE WHERE CITY=" + p_city + "AND
> HOBBY=" + p_hobby
>
> p_city and p_hobby are variables (String) in servlet.
> Servlet getting p_city and p_hobby values from GUI
> made by applet.
>
> My question is :
> How to send the value of cityTextField and
> hobbyTextFiled ( from applet ) to servlet, and then
> inserting these value to p_city and p_hobby.
>
> Hopping my explanation is clear.
>
> Thank you in advance.
>
> - pamungkas-
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
>
> ___________________________________________________________________________
> 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