File IO with originating host

Hi,

I am working on an applet that allows a user to generate an animated gif for a chinese character (showing the order in which to draw the strokes). The applet works fine if I run it locally on my machine, but it requires access to the file system twice: one file-read for creating a Font object from a .TTF file, and one file-write to output the animated gif.

I would like to host this applet on a server. Now, however, the file accesses in the applet will refer to the client's filesystem which would be wrong (also the access won't be granted anyway due to security restrictions). Is there an easy way to access files, read and write, on the originating host instead of on the client (from what I understand this wouldn't violate the applet security restrictions)?

Thanks,

Thomas

[818 byte] By [thomas_strohmanna] at [2007-11-26 13:49:31]
# 1

You can make the applet open up a net connection back to the server and send the files through there.

(Although I've never tried that for a font description file. I assume that's possible but don't know.)

The server would have to know how to handle those connections. You can do that in a variety of ways, typically servlets or CGI scripts. The next step is for you to determine what you can do with your server -- it varies.

Note that you can violate applet security restrictions, if you sign the applet and if the client chooses to let the signed applet violate the restrictions.

paulcwa at 2007-7-8 1:26:02 > top of Java-index,Desktop,Core GUI APIs...
# 2
Thanks, I'll try the idea with the servlet or CGI script. (if possible I want to avoid requiring people having to trust an applet signed by just me as an individual)
thomas_strohmanna at 2007-7-8 1:26:02 > top of Java-index,Desktop,Core GUI APIs...