1 19 package org.netbeans.modules.exceptions.web; 20 21 import javax.servlet.http.HttpServletRequest ; 22 import javax.servlet.http.HttpServletResponse ; 23 import org.apache.struts.action.ActionForm; 24 import org.apache.struts.action.ActionMapping; 25 import org.apache.struts.action.ActionForward; 26 import org.netbeans.modules.exceptions.entity.Issue; 27 32 33 public class DetailAction extends MyAction { 34 35 36 private final static String SUCCESS = "success"; 37 38 47 public ActionForward execute(ActionMapping mapping, ActionForm form, 48 HttpServletRequest request, HttpServletResponse response) 49 throws Exception { 50 Integer id = null; 51 try { 52 id = new Integer (request.getParameter("id")); 53 } catch (NumberFormatException e) { 54 } 55 56 57 request.setAttribute("issue", getEntity(Issue.class, id)); 58 return mapping.findForward(SUCCESS); 59 60 } 61 } 62 | Popular Tags |