日期:2014-05-17 浏览次数:20774 次
<%@ page language="java" pageEncoding="GB18030"%> <jsp:directive.page import="java.net.URLEncoder"/> <% request.setCharacterEncoding("GB18030"); String srcURL = String.valueOf(request.getAttribute("srcURL"));//资源路径 response.setContentType("application/x-download"); String url = "/upload/doc/"+srcURL; String fileName = srcURL; fileName = URLEncoder.encode(fileName, "UTF-8"); response.addHeader("Content-Disposition", "attachment;filename=" + fileName); RequestDispatcher rd = application.getRequestDispatcher(url); rd.forward(request, response); response.flushBuffer(); out.clear(); out.clearBuffer(); out = pageContext.pushBody(); %>
2009-8-26 22:06:58 org.apache.catalina.core.ApplicationDispatcher invoke 严重: Servlet.service() for servlet jsp threw exception java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(Unknown Source) at java.net.SocketOutputStream.write(Unknown Source) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:750) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:773) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:583) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:2083) at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1796) at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:874) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:376) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.j