File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Writing files on server with Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Writing files on server with Applet" Watch "Writing files on server with Applet" New topic

Writing files on server with Applet

Vincent Oh
Ranch Hand

Joined: Jan 02, 2012
Posts: 33
Hi guys,

I know that there are security issues with writing files directly to the web server using Applets. However, it seems that it is possible to send a request to the server to tell the server to write the file on its own.

Does anyone have experience in doing such? I need some help.

Main idea of what I need to do is:

1) My applet allow users to create some diagrams and save it to the server.

Can I use servlets to handle the request sent by Applet? If yes, how do I go about doing it. If no, any other ways to do it?

Thanks in advance =D
Tarun Bolla
Ranch Hand

Joined: Jun 20, 2011
Posts: 89
Yes you can use servlets to handle such things. Just upload the content using HTTP POST by using URLConnection
Go through this
An on the server side, write a Servlet to handle the data
Luis Martins

Joined: Mar 07, 2012
Posts: 8
See this:
I agree. Here's the link:
subject: Writing files on server with Applet
It's not a secret anymore!