MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » 一个关于jspsmartupload下载的有关问题

一个关于jspsmartupload下载的有关问题

www.MyException.Cn  网友分享于:2013-12-25  浏览:17次
一个关于jspsmartupload下载的问题
昨天作了一个简单的下载的页面,可是总是有问题,在网上找了很多解决方法但是仍然不行!希望那位高手帮忙看下,感激之至!
代码:
<%@   page   contentType= "text/html;charset=gb2312 "   import= "com.jspsmart.upload.* "   %>
<%response.reset();
SmartUpload   su   =   new   SmartUpload();
response.reset();
su.initialize(pageContext);
su.setContentDisposition(null);
su.downloadFile( "/upload/test.txt ");%>
错误信息:
java.lang.IllegalStateException:   getWriter()   has   already   been   called   for   this   response
              org.apache.catalina.connector.Response.getOutputStream(Response.java:565)
              org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:171)
              com.jspsmart.upload.SmartUpload.downloadFile(SmartUpload.java:579)
              com.jspsmart.upload.SmartUpload.downloadFile(SmartUpload.java:508)
              com.jspsmart.upload.SmartUpload.downloadFile(SmartUpload.java:476)
              org.apache.jsp.download_jsp._jspService(org.apache.jsp.download_jsp:50)
              org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
              javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
              org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
              org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
              org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
              javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
              EncodingFilter.doFilter(EncodingFilter.java:40)

那位高手帮小弟看一下把!非常感谢!或者谁有jspsmartupload的源码及应用实例发给我,我的邮箱是lzq_dragon@163.com,再次感谢!

------解决方案--------------------
已经发给你了,带视频讲解,请查收。

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有