Re: Java Serialized objects

From: Christophe Vanfleteren (c.v4nfl3t3r3n_at_pandora.be)
Date: 04/25/04


Date: Sun, 25 Apr 2004 07:40:55 GMT

Chandrashekar Tippur wrote:

> All,
>
> I have a serialized object which reads and writes to a file. While it
> reads, it fills up its attributes. When I try to run this on a
> astandalone machine, it works fine but when I try with client server
> (Via the browser) it is coming up with AcccessControlException and the
> exception looks like the program is trying to write in the client
> rather than the server. I want both read and write from the file to
> happen at the server.
> Please let me know where I am going wrong.
>
> Shekar

Any File object works on the *local* filesystem. So for an applet, this is
the client the applet is running on.

You can read from a file on the server as easy as from a local one using an
URL, but writing to it is not that simple. You'll have to use something
like RMI, HTTP Post or FTP.

-- 
Kind regards,
Christophe Vanfleteren


Relevant Pages

  • Re: Applet Consideration
    ... the client applet to connect to the server. ... My computer(the server) is behind a router ... > i.e. boolean login(String domain, String user, String pass) ...
    (comp.lang.java.databases)
  • Re: problem with applet ....
    ... >might be the Applet security sandbox.. ... server program (creates a ServerSocket, after a Client socket etc ... I see a new Board in the SimpleClient applet, ...
    (comp.lang.java.programmer)
  • Re: problem with applet ....
    ... the applet creates a new board. ... These images when the applets starts ... Server sends the board to the client. ...
    (comp.lang.java.programmer)
  • Re: How to do form signing with Certificates?
    ... I've got a HTML form with some sensitive information (such as ... now I would like the client to use his/her eCert to signed the form ... the server should check if the form ... applet to do the signing, so applet may be a good choice. ...
    (comp.lang.java.security)
  • Re: Calling a DLL from a Java Applet
    ... >> I'm trying to write a Java applet to call a dll that resides on the web ... >> web server. ... > The applet runs on the client. ...
    (comp.lang.java)