• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting org.apache.jasper.JasperException: Stream closed

 
anu kuntala
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am getting org.apache.jasper.JasperException: Stream closed Exception after logging in to my Application. I am using ATG CSC Application and Server is JBOSS.
The complete stack trace is as follows:
Caught exception in main.jsp: CONTAINER:atg.servlet.jsp.ContainerJspException: Stream closed; SOURCErg.apache.jasper.JasperException: Stream closed
CONTAINER:atg.servlet.jsp.ContainerJspException: Stream closed; SOURCErg.apache.jasper.JasperException: Stream closed
at atg.taglib.dspjsp.IncludeTag.doEndTag(Unknown Source)
at org.apache.jsp.main_jsp._jspx_meth_dspel_include_5(main_jsp.java:2968)
at org.apache.jsp.main_jsp._jspx_meth_fmt_bundle_0(main_jsp.java:1776)
at org.apache.jsp.main_jsp._jspService(main_jsp.java:428)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
....stack trace CROPPED after 10 lines.
Caused by rg.apache.jasper.JasperException: Stream closed
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:383)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
....stack trace CROPPED after 10 lines.
Caused by (#2):java.io.IOException: Stream closed
at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)
at org.apache.jasper.runtime.JspWriterImpl.clearBuffer(JspWriterImpl.java:159)
at org.apache.jsp.templates.pageLayout_jsp._jspService(pageLayout_jsp.java:448)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
....stack trace CROPPED after 10 lines.

Here I am not getting what is the root cause of the problem.Any help is greatly appreciated..
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anu kuntala wrote:
Caused by (#2):java.io.IOException: Stream closed
at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)
at org.apache.jasper.runtime.JspWriterImpl.clearBuffer(JspWriterImpl.java:159)
at org.apache.jsp.templates.pageLayout_jsp._jspService(pageLayout_jsp.java:448)

The outputstream of the response is already closed.
Are you writing raw java code in a JSP file using scriptlets?
Are you getting the outputstream of the response and closing it inside the scriptlet?

You should in no way write raw Java code in a JSP file. Use a Java class.
You should in no way get the outputstream in a scriptlet. Use a Servlet class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!