Journal
<% List entries; DatabaseConnection cxn; int i, commentCount, editCount; Entry entry; SimpleDateFormat sdf = new SimpleDateFormat("EEEE, dd MMMM yyyy @ HH:mm"); SimpleDateFormat editDateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm"); String dateString; cxn = new DatabaseConnection(getServletConfig().getServletContext().getRealPath("config.path")); cxn.open(); if(cxn.isOpen()) { entries = cxn.getLastNEntries(5); for(i = 0; i < entries.size(); i++) { entry = (Entry)entries.get(i); dateString = sdf.format(entry.getTimestamp()); %>
<%= entry.getBody() %>
