Publishing.java~3~
上传用户:toby828
上传日期:2015-06-26
资源大小:8558k
文件大小:1k
- package com.action;
- import org.apache.struts.action.ActionMapping;
- import org.apache.struts.action.ActionForm;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import org.apache.struts.action.ActionForward;
- import com.actionForm.PublishingForm;
- import org.apache.struts.action.Action;
- import com.dao.PublishingDAO;
- public class Publishing extends Action {
- private PublishingDAO pubDAO = null;
- public Publishing() {
- this.pubDAO = new PublishingDAO();
- }
- public ActionForward perform(ActionMapping mapping, ActionForm form,
- HttpServletRequest request,
- HttpServletResponse response) {
- PublishingForm publishingForm = (PublishingForm) form;
- String action =request.getParameter("action");
- System.out.println("nbook*********************action="+action);
- if(action==null||"".equals(action)){
- request.setAttribute("error","您的操作有误!");
- return mapping.findForward("error");
- }else if("bookQuery".equals(action)){
- return bookQuery(mapping,form,request,response);
- }
- request.setAttribute("error","操作失败!");
- return mapping.findForward("error");
- }
- }