}
public ActionForward edit(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {
HttpInteractionEnterOrEditForm f = (HttpInteractionEnterOrEditForm)form;
HttpCommandEntry commandEntry = (HttpCommandEntry)commandEntryFromRequest(req);
if(commandEntry == null){
throw new InputException(getResources(req).getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
}
checkAccessRights(req, commandEntry.getGroup());
f.setCommandEntryId(commandEntry.getId());
f.setSortLabel(commandEntry.getSortLabel());
f.setUrl(commandEntry.getUrl());
f.setNofEvaluatedResponseLetters(commandEntry.getNofEvaluatedResponseLetters() + "");
req.getSession().setAttribute("enterOrEdit", "edit");
req.getSession().setAttribute("groupId", commandEntry.getGroup().getId()); // the groupId is used by the method getSortedCommandEntries
req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
TreeSet<CommandEntry> sortedCommandEntries = getSortedCommandEntries(req);
req.getSession().setAttribute("templates",sortedCommandEntries);
Long selectedTemplateId = f.getTemplateId();