Can any one post a - code snippet - which can create a .txt file on the application server - using the text from a "textArea" on a JSP page. (Basically the user types some text on the JSP on a client and the text should be saved to a txt-file on ap-server.)
Hi, this works in my own computer:
String textFromTextArea = request.getParameter("message");
String path = "c: empfile.txt";
File file = new File(path);
Writer writer = new BufferedWriter(new FileWriter(file));
It gets the value of field "message" and saves it in file.txt.