BookCaseModify.java~4~
上传用户:toby828
上传日期:2015-06-26
资源大小:8558k
文件大小:1k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. package com.action;
  2. import org.apache.struts.action.ActionMapping;
  3. import org.apache.struts.action.ActionForm;
  4. import javax.servlet.http.HttpServletRequest;
  5. import javax.servlet.http.HttpServletResponse;
  6. import org.apache.struts.action.ActionForward;
  7. import com.actionForm.BookCaseForm;
  8. import org.apache.struts.action.Action;
  9. import com.dao.BookCaseDAO;
  10. public class BookCaseModify extends Action {
  11.     private BookCaseDAO bookCaseDAO=new BookCaseDAO();
  12.     public ActionForward perform(ActionMapping actionMapping,
  13.                                  ActionForm actionForm,
  14.                                  HttpServletRequest servletRequest,
  15.                                  HttpServletResponse servletResponse) {
  16.         BookCaseForm bookCaseForm = (BookCaseForm) actionForm;
  17.         bookCaseForm.setName(servletRequest.getParameter("name"));
  18.         int ret=bookCaseDAO.Update(bookCaseForm);
  19.         if (ret==0){
  20.         }else{
  21.         }
  22.         return actionMapping.findForward("bookCaseModify");
  23.     }
  24. }