Author: jacopoc
Date: Fri Jul 20 14:03:34 2012
New Revision: 1363786
URL:
http://svn.apache.org/viewvc?rev=1363786&view=revLog:
Added a new special error string returned by the serveObjectData event when the output stream has been already used; this is associated to a no-response because we will not be able to return the error page; this used to cause an error in the logs.
Modified:
ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java
Modified: ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml?rev=1363786&r1=1363785&r2=1363786&view=diff==============================================================================
--- ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml Fri Jul 20 14:03:34 2012
@@ -46,6 +46,7 @@ under the License.
<event type="java" path="org.ofbiz.content.data.DataEvents" invoke="serveObjectData"/>
<response name="success" type="none"/>
<response name="error" type="view" value="error"/>
+ <response name="io-error" type="none"/>
</request-map>
</site-conf>
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java?rev=1363786&r1=1363785&r2=1363786&view=diff==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java Fri Jul 20 14:03:34 2012
@@ -209,7 +209,9 @@ public class DataEvents {
} catch (IOException e) {
Debug.logError(e, "Unable to write content to browser", module);
request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
- return "error";
+ // this must be handled with a special error string because the output stream has been already used and we will not be able to return the error page;
+ // the "io-error" should be associated to a response of type "none"
+ return "io-error";
}
} else {
String errorMsg = "No data is available.";