Posted on 2009-07-15 11:11
Gavin.lee 阅读(1926)
评论(0) 编辑 收藏 所属分类:
wap 积累
[11:04:33.250] java.lang.IllegalStateException: Can't sendRedirect() after data has committed to the client.
[11:04:33.250] at com.caucho.server.connection.AbstractHttpResponse.sendRedirect(AbstractHttpResponse.java:567)
[11:04:33.250] at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:109)
[11:04:33.250] at com.caucho.server.connection.ResponseWrapper.sendRedirect(ResponseWrapper.java:276)
[11:04:33.250] at com.caucho.server.connection.ResponseAdapter.sendRedirect(ResponseAdapter.java:157)
[11:04:33.250] at yixun.wap.tools.GetRequest.ToPage(GetRequest.java:76)
[11:04:33.250] at _jsp._page._user._login._userlogindo__jsp._jspService(_userlogindo__jsp.java:90)
[11:04:33.250] at com.caucho.jsp.JavaPage.service(JavaPage.java:61)
[11:04:33.250] at com.caucho.jsp.Page.pageservice(Page.java:586)
[11:04:33.250] at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:190)
[11:04:33.250] at yixun.wap.filter.ReplaceTextFilter.doFilter(ReplaceTextFilter.java:77)
[11:04:33.250] at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:73)
[11:04:33.250] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:167)
[11:04:33.250] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:226)
[11:04:33.250] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
[11:04:33.250] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:477)
[11:04:33.250] at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:591)
[11:04:33.250] at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:513)
[11:04:33.250] at java.lang.Thread.run(Thread.java:619)
关于这个问题,以前是能经常碰到的,也没仔细的去研究,这段时间又碰到了,阴魂不散的。今天刚好有时间查查,
网上都说是有out.println(),也就是说在转发的同时,容器回去检查该连接是否与客户端正在传输数据。
所以知道原理了,操作起来就好办了,直接response.getWriter().close();
就是说关闭response的输出,再进行转发