We have a legacy application based on JSP pages that use Custom Tags. The
custom tags extends javax.servlet.jsp.tagext.BodyTagSupport

This application worked fine for years on JBoss, but now we migrated to
Tomcat and the same code throws the following exception:

"javax.servlet.jsp.JspException: IO Error: Stream closed"

on Repetition.doEndTag() line marked below:

public int doEndTag() throws JspException {

try {
if (bodyContent != null) {
/* Stream Closed here => */
bodyContent.writeOut(bodyContent.getEnclosingWriter());
bodyContent.clearBody();
}
}
catch (IOException e) {
throw new JspException("IO Error: " + e.getLocalizedMessage());
}
finally {
cleanup();
}

return EVAL_PAGE;

}

Any ideas? We tried different versions of Tomcat (8.5.24, 8.5.47, 9.0.27)
as well as different versions of jsp-api.jar and servlet-api.jar but the
problem still there.

Thanks

Reply via email to