File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » Applets
Bookmark "Writing files on server with Applet" Watch "Writing files on server with Applet" New topic
Author

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 http://docs.oracle.com/javase/tutorial/networking/urls/readingWriting.html
An on the server side, write a Servlet to handle the data
Luis Martins
Greenhorn

Joined: Mar 07, 2012
Posts: 8
See this: www.zehon.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing files on server with Applet