OSCache報錯error while trying to flush writer

來源:互聯網
上載者:User

標籤:style   http   os   io   使用   java   ar   strong   for   

Struts2.3+spring3+hibernate3開發
現在想在原有基礎上使用 oscache提高效能,使用中發現問題
例如:使用struts2標籤
<cache:cache time="60" scope="session">
<s:action  name="ztree.action" executeResult="false"/>
</cache:cache>
其中 這個action功能是從資料庫讀取資料 報錯
WARN [http-8080-Processor5] ActionComponent:122 - Error while trying to flush writer
java.io.IOException: Illegal to flush within a custom tag
at javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:79)
at com.opensymphony.webwork.components.ActionComponent.end(ActionComponent.java:120)
at com.opensymphony.webwork.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:21)
at org.apache.jsp.oscacheDemo_jsp._jspx_meth_ww_action_0(org.apache.jsp.oscacheDemo_jsp:232)
at org.apache.jsp.oscacheDemo_jsp._jspx_meth_cache_cache_0(org.apache.jsp.oscacheDemo_jsp:178)

但是資料一樣能取出來
在一分鐘內 重新整理該頁面 cache包含的部分不再執
其實設定下 參數 flush="false" 為false即可。

<cache:cache time="60" scope="session">
<s:action  name="ztree.action" executeResult="false" flush="false"/>
</cache:cache>

OSCache報錯error while trying to flush writer

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.