bgdelnewsaction.java
来自「这是一个上传下载的原代码」· Java 代码 · 共 42 行
JAVA
42 行
package com.model.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.model.entity.NewsInfo;
import com.model.entity.UserInfo;
import com.model.logic.BackLogic;
public class BgdelnewsAction extends Action{
public BackLogic backLogic;
public BackLogic getBackLogic() {
return backLogic;
}
public void setBackLogic(BackLogic backLogic) {
this.backLogic = backLogic;
}
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
String id = (String)request.getParameter("newsId");
NewsInfo newsinfo = new NewsInfo();
newsinfo.setNewsId(id);
String forward = this.getBackLogic().delnews(newsinfo);
if("success".equals(forward)){
return mapping.findForward("success");
}else{
return mapping.findForward("fail");
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?