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 applet to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "applet to servlet" Watch "applet to servlet" New topic
Author

applet to servlet

anirudh takkallapally
Greenhorn

Joined: Sep 04, 2003
Posts: 14
Hi.
I am doing a project in which I have to send some data from applet to the servlet , where the servlet has to invoke a process with this data , the process generates a figure , I have to display this figure to the client.
I have two questions , how do I send the data , the data basically consists of 4 ints and 3 strings, can I create an object with these and send it directly or do I need to do object serialization before sending them , I tried sending them but it did not work, if u have any working code for this I would appreciate it if u can send me other wise please guide me how to do this.
My second question is , when I am doing applet servlet communication can I display a HTML page using a servlet , that is after invoking a servlet from the applet .
I would be grateful if u can help me out here,
Yours sincerely
Anirudh Takkallapally
Sanjeev Kaushik
Ranch Hand

Joined: Aug 01, 2002
Posts: 105
Hi,
You can open a URL connection in your applet to read the contents from servlet. You can get the values in key/value pair(text format) and leter convert to relevant formats.
You can display the html contents from applet, via communicating to javascript. You can use JSObject to communicate to javascript.
You can see the api of JSObject on the link below
http://wp.netscape.com/eng/mozilla/3.0/handbook/plugins/doc/netscape.javascript.JSObject.html
Regards,
Sanjeev


Sanjeev Kaushik
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: applet to servlet