jQuery in Action, 3rd edition
The moose likes Applets and the fly likes sending data from applet  to  servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "sending data from applet  to  servlet" Watch "sending data from applet  to  servlet" New topic

sending data from applet to servlet

Abhishek Yadav

Joined: Nov 15, 2006
Posts: 26
I posted this problem earlier and got solution of that, thanks a lot, but there are some complexity in getting the desired output. Below is the description.

i am working on a web application in which a user can select an item(say a T-shirt) and can decorate on that item(simply by adding some text or image on it).For this we are using an applet and calling functions on it with javascript. When we select an item, the image of the item is loaded in the applet and all drawing is done on applet. After drawing i want to save the state of the applet as an image(probably in database).

Some how i have succeded in saving the image of front and back side of the product to the server folder by writing the generated image to servlet output stream and read the data in the servlet code. I used a third party library for that.

My problem is how to write the image and some data(name and email of the person) to the servlet at the same time so that on the server side in the servlet code i can save the design associated with a particular person.

Abhishek Yadav
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
So you want to do a POST from the applet to the servlet? Check out example e135 here.
I agree. Here's the link: http://aspose.com/file-tools
subject: sending data from applet to servlet
It's not a secret anymore!