Debug.println("RecordServlet.doEdit: Setting 'record' to " + record);
    private void doEdit (DatabaseRecord proto,                         String recordType,                         String idParam,                         HttpServletRequest request,                         HttpServletResponse response,                         HttpSession session)        throws ServletException, IOException    {        proto.prepareForEdit(request, session);        DatabaseRecord record = null;        if ("new".equalsIgnoreCase(idParam)) {            try {                record = (DatabaseRecord) proto.getClass().newInstance();                record.initializeNewRecord(request, session);            } catch (Exception e1) {                Debug.backtrace(e1);                Util.noteError(session, "Internal error: " + e1);                return;            }        } else {            try {                Integer id = new Integer(idParam);                record = DatabaseRecord.loadRecord(id, proto.getClass(), true);            } catch (NumberFormatException nfe) {                Util.noteError(session, "The requested " + proto.prettyName() + " (id = "                               + idParam + ") was not found.");                request.getRequestDispatcher(ackPage(session)).forward(request, response);                return;            }        }        session.setAttribute("record", record);        String editPage = "/edit-" + recordType.toLowerCase() + ".html";        request.getRequestDispatcher(editPage).forward(request, response);    }