Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

From Applet to JSP

  Asked By: Daisy    Date: Dec 30    Category: Java    Views: 1383
  

I have an Applet having two TextFields and One Push Button. When I click that
button I want to send the data of TextFields to the JSP file at the server. How
would I send the Data from the Applet to The JSP File.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Balbir Kaur     Answered On: Dec 30

You must do the thinks well, the applet  dialog with a servlet this is the
manner.

see google applet to Servlet

 
Answer #2    Answered By: Rene Sullivan     Answered On: Dec 30

use the java.net.URLConnection class to specify the url of the jsp  to
connect. use the url (string) like this
http://xxx:9999/yyyy/zzz.jsp?username=tf.getText()&paswd=tf.getText()

where
xxx is the server  name
yyy is the folder address in which the jsp is
& tf's are the textfields which was used to enter the data/

use the Button to trigger the connection.

Networking by o'reilly publication has an example of the similar nature.
if there is still a problem mail me back. i will send  you a samll example of
the same.

 
Answer #3    Answered By: Milton Robinson     Answered On: Dec 30

If u have a example give me it.

I need to do conexion by tunneling by POST not get, and with applet  not JSP.

I have doing the conexion with the url and the String form applet to
servlet - to applet.

I need now to send  a serialized bean from applet to servlet and after to
applet again.

 
Answer #4    Answered By: Vinit Online     Answered On: Dec 30

1. Make a HTTP-POST call by using URLConnection and also getOutputStream()
in URLConnection, and send  the data  according to
http://ftp.ics.uci.edu/pub/ietf/http/rfc1945.html (may be there is a
regular api or product that simplifies this)...

2. Use regular HTTP technology (servlets etc) and only use the applet  for
formatting, when the data is to be sent, copy it into a regular form-input
field and post the form (maybe even in another frame than the main one).

There are a great number of (more or less complex) "text editors" that can
format text that uses version 2 above. The basic function of these modules
is to act as a richer textarea-tag than the one defined by HTML.

I dont have any examples of how any of these alternatives can be done but i
have seen it done several times and then always only one of these two
versions... (ehm actually i've never seen a POST done by using the java.net
api).

 
Didn't find what you were looking for? Find more on From Applet to JSP Or get search suggestion and latest updates.




Tagged: