使用s:form产生stream closed错误

场景描述:

使用s:form报错,产生stream closed错误;

JSP页面中去掉s:form就恢复正常

原因分析:

因为无法找到form标签,可能是因为重新自定义了标签

解决方法:

查看struts.xml文件,是否重新自定义了标签,如下:

    <constant name="struts.ui.templateDir" value="WEB-INF/template/" />

删除该记录即可

报错记录:

Struts Problem Report

Struts has detected an unhandled exception:

Messages:
  • Stream closed
  • File: org/apache/jasper/runtime/JspWriterImpl.java
    Line number: 273

    Stacktraces

    java.io.IOException: Stream closed
        org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:273)
        org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:177)
        org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:235)
        org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1001)
        org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:687)
        org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:123)
        org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
        com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
        org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
        org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
        org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
        org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
        org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        com.dice.voip.web.oam.actions.accounts.LoginFilter.doFilter(LoginFilter.java:37)
        org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        org.mortbay.jetty.Server.handle(Server.java:326)
        org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
        org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
        org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
        org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
        org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
        

    你可能感兴趣的:(exception,jsp,struts,Stream)