doc_modify.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:2k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=gb2312"
  2. import = "java.io.File"
  3. import="java.io.*"
  4. import="java.util.*"
  5. import="java.sql.*"
  6. import="java.net.URLEncoder"
  7. %>
  8. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  9. <jsp:useBean id="cfgparser" scope="page" class="fan.util.CFGParser"/>
  10. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  11. <jsp:useBean id="TheBean" scope="page" class="fan.util.FileUploadBean" />
  12. <jsp:useBean id="document" scope="page" class="com.redmoon.oa.document.Document"/>
  13. <jsp:useBean id="userservice" scope="page" class="com.redmoon.oa.person.UserService"/>
  14. <%
  15. response.setHeader("Pragma","No-cache");
  16. response.setHeader("Cache-Control","no-cache");
  17. response.setDateHeader("Expires", 0);
  18. java.util.Date currentTime = new java.util.Date();
  19. long inserttime = currentTime.getTime();
  20. String filenm = String.valueOf(inserttime);
  21. String[] extnames = {"jpg","gif","zip","rar","doc","rm","avi","bmp","swf"};
  22. TheBean.setValidExtname(extnames);//   ϴ ļ  
  23. TheBean.setDefaultFileSize(1500);//  1500K
  24. int ret = TheBean.doUpload(request,filenm);
  25. if (ret==-3)
  26. {
  27.   out.print("   ļ ,