一个关于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,再次感谢!
------解决方案--------------------已经发给你了,带视频讲解,请查收。