1 16 package dlog4j.action; 17 18 import javax.servlet.http.HttpServletRequest ; 19 import javax.servlet.http.HttpServletResponse ; 20 21 import org.apache.struts.action.ActionForm; 22 import org.apache.struts.action.ActionForward; 23 import org.apache.struts.action.ActionMapping; 24 25 29 public class DlogSearchAction extends DlogActionBase { 30 31 40 public ActionForward doSearch(ActionMapping mapping, 41 ActionForm form, HttpServletRequest request, 42 HttpServletResponse response) throws Exception 43 { 44 int cat_id = -1; 45 try{ 46 cat_id = Integer.parseInt(request.getParameter("cat_id")); 47 }catch(Exception e){} 48 String scope = "comment"; 49 if(cat_id!=-2){ 50 scope = request.getParameter("scope"); 51 if(scope==null) 52 scope = "log"; 53 } 54 return mapping.findForward(scope); 55 } 56 57 66 public ActionForward doDefault(ActionMapping mapping, 67 ActionForm form, HttpServletRequest request, 68 HttpServletResponse response) throws Exception 69 { 70 return doSearch(mapping,form,request,response); 71 } 72 } 73 | Popular Tags |