CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: File I/O - How?

  1. #1
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    File I/O - How?



    I would like to be able to create and maintain a small text file on the server from which the applet runs, i.e. local to the applet. The file would contain information I want to keep persistent, such as a counter's current count, for example. The problem is, when I try to create the DataInputStream or DataOutputStream I get a security exception thrown.


    How am I supposed to maintain persistent data if I can't use a file? It's not like I'm trying to store it on the user's PC, I'm trying to store it on the applet's server! What am I missing? Or is there a better way to do what I want?


    Thanks in advance.



    --
    Jason Teagle
    [email protected]

  2. #2
    Join Date
    Mar 1999
    Posts
    14

    Re: File I/O - How?



    Hi,

    The problem is there because the browser default SecurityManager do not allow the applet to be able to access the file on the local machine.

    In order to achieve that,you've to override it's SecurityManager.but I'm still thinking how? It is b'cuz it is not allowed to set a security manager when a security manager is already existing..

    Singh




  3. #3
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: File I/O - How?



    This makes sense, as I read up a little on the Security Manager and found that particular problem. If anyone has any further ideas, please let me know.



    --
    Jason Teagle
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured