JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Servlet/JSP 討論區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
作者 Attempt to clear a buffer that's already been flushed
gfyy0827





發文: 54
積分: 0
於 2009-02-02 16:16 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Sad

寫到一個網頁有個問題...

我的SESSION有存MemberID

我的網頁判斷,若MemberID==null的時候,

則轉址到登入頁面,

但是一直出現下面的錯誤...

2009/2/2 下午 04:09:03 org.apache.catalina.core.StandardWrapperValve invoke
嚴重的: Servlet.service() for servlet jsp threw exception
java.io.IOException: Error: Attempt to clear a buffer that's already been flushed
  at org.apache.jasper.runtime.JspWriterImpl.clear(JspWriterImpl.java:150)
  at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:665)
  at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
  at org.apache.jsp.test.ShoppingCart.ShoppingUserProcess_jsp._jspService(ShoppingUserProcess_jsp.java:263)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:124)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
  at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
  at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
  at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
  at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)


我的程式碼如下:

<%
if(session.getAttribute("MemberID")==null) {
String ReturnUrl = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + MappingPath + request.getContextPath() + request.getServletPath();
%>

<jsp:forward page="MemberLogin.jsp">
<jsp:param name="ReturnUrl" value="<%= ReturnUrl %>" />
</jsp:forward>

<%
}
%>


不知道大家是否有遇過這種情況呢?那都是怎麼解決的@@?


reply to postreply to post
Programmer是條不歸路。
http://www.wretch.cc/blog/etchen
話題樹型展開
人氣 標題 作者 字數 發文時間
1984 Attempt to clear a buffer that's already been flushed gfyy0827 3052 2009-02-02 16:16
1843 Re:Attempt to clear a buffer that's already been flushed koji 56 2009-02-02 16:22
1985 Re:Attempt to clear a buffer that's already been flushed gfyy0827 68 2009-02-02 16:25
» JWorld@TW »  Servlet/JSP 討論區

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8