I am new to jsp. I have created a simple login page. Now i want to save/retrieve the password in textfile. The following is my code to save the username and password. I have save one user and password. Now i want to append new users in the same file. Can anyone please suggest me how to append the new users login details in same file. Also i would like to save the password and display some otherpage on buttonclick.
BufferedWriter objWriter = new BufferedWriter(new FileWriter("/home/gayathri/eclipse-workspace/Simplelogin/WebContent/WEB-INF/file.txt"));
objWriter.write(username + "#" + password );
objWriter.newLine();
objWriter.close();