Dear friends,
I want to save a data fro applet to a ext file in a folder near to the applet jar. I mean applet jat and new file folder are in same folder. If the new folder is in desktop also it is ok. Please share your knowledge about this.
thanks
raghavendra
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
7
posted
0
For security reasons, applets are not allowed access to the local file system unless you take special steps to allow that. Furthermore applets reside on a server to which the applet has no file I/O access to begin with (I mention this because you're talking of "in the same folder").
Maybe a WebStart application -or even a standalone desktop application- would be better suited for this task?
Ulf Dittmer wrote:For security reasons, applets are not allowed access to the local file system unless you take special steps to allow that. Furthermore applets reside on a server to which the applet has no file I/O access to begin with (I mention this because you're talking of "in the same folder").
Maybe a WebStart application -or even a standalone desktop application- would be better suited for this task?
Local File System By default, JWS applications are subject to the same security restrictions as applets. But JWS apps. have access to the JNLP API, which provides the FileContents object available through the FileOpenService and FileOpenService. Here is a demo of the file services.
As of Sun's Next Generation Plug-In2, embedded applets can be configured using JWS & have access to the JNLP API.
Server File system None of an applet or JWS app. (sand-boxed or trusted), or a plain application (no security manager) can write to a place on the server without help from the server. If the server provides a public interface to allow file upload, it can be accessed by a sand-boxed app. if the app. comes from the same server ('phone home').
Andrew Thompson
http://pscode.org/
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.