posts - 89, comments - 241, trackbacks - 0, articles - 1
   :: 首页 ::  :: 联系 :: 聚合  :: 管理

谁可以帮我一下?ewebeditor飞鱼修改版问题!

Posted on 2009-05-05 19:13 saobaolu 阅读(589) 评论(0)  编辑  收藏 所属分类: javaweb

文件上传的时候,报错

 1Status 500 - 
 2
 3--------------------------------------------------------------------------------
 4
 5type Exception report
 6
 7message 
 8
 9description The server encountered an internal error () that prevented it from fulfilling this request.
10
11exception 
12
13org.apache.jasper.JasperException: An exception occurred processing JSP page /upload.jsp at line 302
14
15299:         if (!myFile.isMissing()) {
16300:             FileName=(String)date.Time_Stamp();
17301:             sOriginalFileName=myFile.getFileName();
18302:             myFile.saveAs("/"+sUploadDir+FileName+"."+myFile.getFileExt());
19303:             sSaveFileName=FileName+"."+myFile.getFileExt();
20304:             sPathFileName=sUploadDir+sSaveFileName;
21305:             System.out.println(sPathFileName);
22
23
24Stacktrace:
25    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
26    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
27    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
28    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
29    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
30    sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
31    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
32    java.lang.reflect.Method.invoke(Method.java:597)
33    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
34    java.security.AccessController.doPrivileged(Native Method)
35    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
36    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
37    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
38
39
40root cause 
41
42java.security.AccessControlException: access denied (java.io.FilePermission \UploadFile read)
43    java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
44    java.security.AccessController.checkPermission(AccessController.java:546)
45    java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
46    java.lang.SecurityManager.checkRead(SecurityManager.java:871)
47    java.io.File.exists(File.java:731)
48    com.jspsmart.upload.SmartUpload.getPhysicalPath(SmartUpload.java:1067)
49    com.jspsmart.upload.File.saveAs(File.java:91)
50    com.jspsmart.upload.File.saveAs(File.java:65)
51    org.apache.jsp.upload_jsp._jspService(upload_jsp.java:376)
52    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
53    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
54    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
55    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
56    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
57    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
58    sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
59    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
60    java.lang.reflect.Method.invoke(Method.java:597)
61    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
62    java.security.AccessController.doPrivileged(Native Method)
63    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
64    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
65    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
66
67
68note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
69
70
71--------------------------------------------------------------------------------
72
73Apache Tomcat/6.0.18

正常上传tomcat的提示是:
gif|jpg|jpeg|bmp|GIF|JPG|JPEG|BMP500
UploadFile/20090505063838906.jpg
异常的时候是:
gif|jpg|jpeg|bmp|GIF|JPG|JPEG|BMP500
UploadFile/
苦恼中…………

没有所谓的命运,只有不同的选择!