You may want to investigate using HTTP to handle your transfer.  You could download the file that your applet needs with HTTPClient, and have another JSP page that takes the file back from the applet and saves it on the server using HTTPClient and FileUpload.  That at least gives you rudimentary file open/save functionality that doesn't involve the local filesystem that the applet is running on.  If for some reason you can't use HTTPClient, you can do the same thing with HttpUrlConnection.  Keep in mind when talking to a server with your applet that you have to reference the server EXACTLY like you referenced it in your EMBED or OBJECT tag. i.e. If the applet was downloaded from 127.0.0.1 you have to connect to the server by that IP, if it was dowloaded from www.myserver.com then you have to connect using the FQDN.
 
--Nathan McMinn
 
----- Original Message -----
Sent: Thursday, July 03, 2003 12:35 AM
Subject: Compensating for applet security restrictions

Hello,
 
I currently have a JSP with an APPLET tag (including EMBED and OBJECT references) which runs a JAR file located on my server.  The program runs fine but because the APPLET is run by the Java plug-in whenever it needs to read or write data it attempts to read or write the data from or on the client machine, which is clearly inappropriate.  I do not want to use servlets as I would like to distribute the APPLET and program when I have finished and do not want to assume servlet support.
 
The jar file first program is a JApplet and this creates a JFrame using a normal class file.  All other programs are normal classes (i.e. non-applets).  I want to use the graphics environments on the client machine as my own web server does not have an installed graphics environment.
 
I have been investigating URLConnections, Sockets, Proxy Servers and RMI and have been left feeling confused as I am unclear which is the best approach and all seem very complicated to overcome what seems to be a simple problem.  Furthermore, all examples seem to use a single text file whereas I want to default all IO to the server rather than the client.  Does anyone know a solution for this problem?
 
Regards,
Susan Hoddinott
http://www.hexworx.com

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to