delaction.java

来自「struts+hibernate简单的例子」· Java 代码 · 共 25 行

JAVA
25
字号
package com.brothers.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.brothers.dao.DaoFactory;
import com.brothers.dao.ICDDateDAO;

public class DelAction extends BaseAction {
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
        if (request.getParameter("id") != null)
        {
        	ICDDateDAO dao = DaoFactory.getCDDateDAO();     	
        	dao.delCDDate(Long.parseLong(request.getParameter("id")));
            request.setAttribute("delresult", "true");
         }
        return mapping.findForward("del");		
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?