Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
-
None
-
WebSphere on linux, and Jetty on osx
Description
In committ 1155178 the removal of "if (resultProcessorInvoked.get()) return" seems to have reintroduced an old issue (#TAPESTRY-2619).
When running on a Servlet engine that does not honor HttpResponse.getOutputStream().close() - i.e. subsequent writing to the responses outputstream will be written to the client - which is true for WebSphere but not for Jetty, the final line in AjaxComponentEventRequestHandler will write an new jsonobject to the response, resulting in an invalid json structure.
My guess would be that the following block of code:
-------------
if ((!resultProcessorInvoked.get()) && queue.isPartialRenderInitialized())
// Send an empty JSON reply if no value was returned from the component event handler method.
// This is the typical behavior when an Ajax component event handler returns null.
JSONObject reply = new JSONObject();
resultProcessor.processResultValue(reply);
}
---------------
should be replaced with:
---------------
if ((!resultProcessorInvoked.get()) && queue.isPartialRenderInitialized())
{ partialRenderer.renderPartialPageMarkup(); return; }
// If the result processor was passed a value, then it will already have rendered, and there is nothing more to do.
if (resultProcessorInvoked.get()) return;
// Send an empty JSON reply if no value was returned from the component event handler method.
// This is the typical behavior when an Ajax component event handler returns null.
JSONObject reply = new JSONObject();
resultProcessor.processResultValue(reply);
}
------------------
Attachments
Issue Links
- is duplicated by
-
TAP5-2199 Web project is not able to run on Websphere 8.0.05
-
- Closed
-