Выполняя некоторые операции в моем приложении, я получил
java.lang.IllegalStateException Не удается вызвать sendError()
Когда я снова загружаю страницу, она работает некоторое время правильно, но через некоторое время снова появляется то же исключение. Как я могу преодолеть это исключение?
Ниже приведено исключение:
HTTP Status 500 - Cannot call sendError() after the response has been committed
type Exception report
message Cannot call sendError() after the response has been committed
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:451)
org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:725)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.40 logs.
Struts.xml
<struts>
<package name="default" extends="hibernate-default">
<action name="addUser" method="add" class="com.demo.action.UserAction">
<result name="input">/register.jsp</result>
<result name="success" type="redirect">list</result>
</action>
<action name="list" method="list" class="com.demo.action.UserAction">
<interceptor-ref name="basicStackHibernate" />
<result name="success">/list.jsp</result>
</action>
</package>
</struts>