Help writing and reading from server
I have a signed applet that is trying to read and write a file to the server. I have a logfile stored on the server at www.learning-java.com/logs.logfile.txt.The program runs and doesn't error, it just doesn't write to the file.
This is my code:
URL url = new URL("http://www.learning-java.com/logs/logfile.txt");
URLConnection urlcon = url.openConnection();
urlcon.setDoOutput(true);
urlcon.setUseCaches(true);
PrintWriter out = new PrintWriter(new OutputStreamWriter (urlcon.getOutputStream()));
out.append("@");
out.append("\n" + userName);
out.append("\n" + "USERNAME: " + userName);
out.append("\n" + "DATE/TIME : " + sdf.format(cal.getTime()));
out.append("\n" + "FILENAME: " + fileName);
out.append("\n" + "Number of Questions Answered: " + numQuestions);
out.append("\n" + "Number of Questions Correct: " + correct);
out.append("\n" + "@" +"\n");
out.close();
I want to keep appending each time I write to the file.

