求助 jspsmartupload 出现Files' name is invalid or does not exist !
异常如下。在form中也加了enctype="multipart/form-data"
org.apache.jasper.JasperException: An exception occurred processing JSP page /UpAndDownload/doAdd.jsp at line 25
22: su.setMaxFileSize(filemax);
23: //闄愬埗鏂囦欢涓婁紶绫诲瀷
24: su.setAllowedFilesList(FileListType);
25: com.jspsmart.upload.File file = su.getFiles().getFile(0);
26: ext = file.getFileExt();
27: filelen = file.getSize();
28: if (!file.isMissing()) {
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
root cause
java.lang.IllegalArgumentException: Files' name is invalid or does not exist (1205).
com.jspsmart.upload.Files.getFile(Files.java:73)
org.apache.jsp.UpAndDownload.doAdd_jsp._jspService(doAdd_jsp.java:79)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
org.apache.jasper.JasperException: An exception occurred processing JSP page /UpAndDownload/doAdd.jsp at line 25
22: su.setMaxFileSize(filemax);
23: //闄愬埗鏂囦欢涓婁紶绫诲瀷
24: su.setAllowedFilesList(FileListType);
25: com.jspsmart.upload.File file = su.getFiles().getFile(0);
26: ext = file.getFileExt();
27: filelen = file.getSize();
28: if (!file.isMissing()) {
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
root cause
java.lang.IllegalArgumentException: Files' name is invalid or does not exist (1205).
com.jspsmart.upload.Files.getFile(Files.java:73)
org.apache.jsp.UpAndDownload.doAdd_jsp._jspService(doAdd_jsp.java:79)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
...全文
请发表友善的回复…
发表回复
Minty_Tong 2012-10-30
- 打赏
- 举报
我设置了也照样报这个错误~~~崩溃的很!!不知道什么原因
zhaoshneg 2012-10-17
- 打赏
- 举报
什么原因?
angel21li 2009-09-08
- 打赏
- 举报
设置form中的属性enctype 为"multipart/form-data"
如:<form action="AddManage" method="post" enctype="multipart/form-data">
如:<form action="AddManage" method="post" enctype="multipart/form-data">
chairmanzheng 2009-07-04
- 打赏
- 举报
白眼狼,娘的,你妈的你解决了,就不能说怎么解决吗?你TMD的上来问什么问,还要大家给你解答,你娘的你回答下你怎么解决会死啊?
yollywu 2009-03-25
- 打赏
- 举报
什么原因,我也碰到了。
Andi1101 2008-11-06
- 打赏
- 举报
好了 自己找到了 但是还是谢谢大家
zhao_tk 2008-11-06
- 打赏
- 举报
好像是个格式问题
victorxiang 2008-11-06
- 打赏
- 举报
com.jspsmart.upload.File file = su.getFiles().getFile(0);
建议不要这样写,用个while包起来保险!
还有,可能jsp里出现多个file情况!
建议不要这样写,用个while包起来保险!
还有,可能jsp里出现多个file情况!