Title: RE: Applet-Servlet Communication

Well you have a lot of possibilities.

You can have an HTTPServlet to which you send a request encoded in an URL which contains the parameters, which you will receive in the doGet method of the servlet. Then, you query the database, format the result in some way and send the result back to the applet which in turn will display the stuff in your table.

You can also use serialized objets. That is, you open a connection to the servlet, send it a serialized object which contain your query. You will receive this object in the servlet's doPost method. You cast the request as an instance you defined, read it, query the database and return the resultSet to your Applet as a serialized object.

I suggest you to have a look at www.servlets.com, a web site for the book Java Servlets Programming by Jason Hunter, which is an absolutely excellent book and which contains explanations for different Servlet-Applet communication strategies.

Maxime.

> -----Original Message-----
> From: Rajesh Shrivastav [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 05, 2000 8:21 AM
> To: [EMAIL PROTECTED]
> Subject: Applet-Servlet Communication
>
>
> HGi Every Body,
>
> I want to send a parameter from applet to a servlet
> and to be used in a query to database.i want to
> retrieve the data from the servlet(Output of the
> query) and display the data in JTable in Applet.
>
> Pl Respond
>
> Raj
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online 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

Reply via email to