Write File in Applet

I'm a student. I will be very happy if you could help!

I'm writing an self-signed applet that runs on browser.

Luckily there is no error shown in the java console when i run the applet.

however, i can't store information to a file which is placed at the server(where my applet is placed).

The biggest problem is there is NO ERROR message shown in the java console...

everything seems running very well, except THE FILE IS NOT UPDATE!

my source code for writing file:

--

try{

URL url1 = new URL("http://appletServer/~doris/1/User.properties");

URLConnection con=url1.openConnection();

con.setDoOutput(true);

OutputStream out = con.getOutputStream();

props.store(out, "User properties of NAMS");//"props" is a property that contains some properties information.

}

catch(Exception e){

System.err.println("Error: " +e);

}

Thanks for your attention!

[977 byte] By [dorischan] at [2007-9-26 4:50:01]
«« jsp
»» Ip address
# 1

try{

URL url = new URL("");

URLConnection con = url.openConnection();

con.setDoOutput(true);

con.setDoInput(true);

con.setUseCaches(false);

con.setRequestProperty("Content-type", "text/plain");

con.setRequestProperty("Content-length", data.length()+"");

PrintStream out = new PrintStream(con.getOutputStream());

out.print(data);

out.flush();

out.close();

}

catch(Exception e){}

JS2 at 2007-6-29 18:41:03 > top of Java-index,Security,Signed Applets...
# 2
Hi I did try the 2 options but i get this error :" io error java.net.UnknownServiceException: protocol doesn't support output"Any Ideas
noah.w at 2007-6-29 18:41:03 > top of Java-index,Security,Signed Applets...
# 3
try thistry{FileWriter fw = new FileWriter(localpath,true);fw.write(your string);fw.close();}catch(Exception exbis) {}chris
christophe.arioli at 2007-6-29 18:41:03 > top of Java-index,Security,Signed Applets...