i have file: input.txt I want to read this file, put values in new output.txt from input.txt.
Servlet.java
protected void processRequest(HttpServletRequ
Apache FileUtils, could make it simple
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
List lines = FileUtils.readLines(new File("file.txt), "UTF-8");
for (String line : lines) {
out.println(line);
}
}