I've a master JSP page which uses <s:include/>
tag to include 3 other JSP files. One of the 3 JSP file has large text body. When the action class returns success the master JSP should be invoked should load the content from the other 3 JSP-s. In doing so it is throwing BufferOverflowException
:
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(Unknown Source)
at org.apache.struts2.util.FastByteArrayOutputStream.decodeAndWriteOut(FastByteArrayOutputStream.java:150)
at org.apache.struts2.util.FastByteArrayOutputStream.writeTo(FastByteArrayOutputStream.java:93)
at org.apache.struts2.components.Include.include(Include.java:260)
at org.apache.struts2.components.Include.end(Include.java:153)
at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
I've tried the following approaches but still getting the same exception
1) Adding the page attribute to JSP-s <%@ page buffer="64kb" autoFlush="true"%>
2) modified connector entry in server.xml
<Connector connectionTimeout="20000" port="8081" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443" socket.appWriteBufSize="64000"/>
Any suggestions would be greatly appreciated.