quan_qiouUpdate.jsp
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:1k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <jsp:useBean id="quan_qiouBean" class="MyFly.Bean.quan_qiouBean" scope="request"/>
  3. <%@ page import="java.util.Date,java.text.SimpleDateFormat"%>
  4. <%request.setCharacterEncoding("GB2312");%>
  5. <%
  6.      String index=request.getParameter("index");
  7.  
  8.      String title=request.getParameter("title");
  9.  String content=request.getParameter("content");
  10.  SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd");//将显示"1999-10-1 21:03:10"的格式. 
  11.      Date currentTime_1 = new Date(); 
  12.      String appendTime = formatter.format(currentTime_1);
  13.  
  14.  quan_qiouBean.setQuanID(Integer.parseInt(index));
  15.  quan_qiouBean.setTitle(title);
  16.  quan_qiouBean.setContent(content);
  17.  quan_qiouBean.setAppendTime(appendTime);
  18.  
  19. if(quan_qiouBean.update() == 1)
  20. {
  21.      out.println("<script language=javascript>location.href='quan_qiouView.jsp';</script>");
  22.  
  23. }
  24. else
  25. {
  26.    out.println("<Script language=JavaScript>alert('修改失败,请重新修改');JavaScript:history.back();</Script>");
  27. }
  28. %>