%@ page import="java.util.*,java.io.*,example.*" %>
Your entry looks like this:
From: <%= entry[0] %>
<%= (!entry[1].equals("None") ? "<"+entry[1]+">" : "") %>
<% if (!entry[2].equals("None")) { %>
Home Page: <%= entry[2] %>
<% } %>
Date: <%= entryDate %>
IP: <%= ip %>
<% try { boolean append = true; String filename = application.getRealPath(id + ".gbf"); FileWriter fw = new FileWriter(filename, append); BufferedWriter fileOut = new BufferedWriter(fw); String newEntry = entry[0] + "^" + entry[1] + "^" + entry[2] + "^" + entryDate + "^" + ip + "^" + entry[3]; fileOut.write(newEntry, 0, newEntry.length()); fileOut.newLine(); fileOut.close(); } catch (IOException e) { out.println("<%= entry[3] %>
This guestbook could not be updated."); log("Guestbook Error: " + e.toString()); } %>