partial submit (for ppr) does not work for some jsp with a rendered XML-PI
--------------------------------------------------------------------------
Key: TRINIDAD-1142
URL: https://issues.apache.org/jira/browse/TRINIDAD-1142
Project: MyFaces Trinidad
Issue Type: Bug
Components: Components
Affects Versions: 1.2.8-core
Environment: Sun AS 9.1 (glassfish), Java 1.5, Mac OS X 10.5.4, Safari
+ Firefox 3.0
Reporter: burghard.w.v.britzke
For some JSP with a XML-PI in the rendered result PPR seems not to work.
The response of the PPR request is routed into an empty case of a chained if
statement in the js-function _handlePprResponse() in file DebugCommon1_2_8.js.
20723 else
20723 {
20724 // FIXME: log an error
20725 }
This is because the rootNodeName is "parseerror", which is not checked in the
chained if statement.
The parse error occures because two XML-PI are packed together in the response.
The response looks like
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" ?>
<?Tr-XHR-Response-Type ?>
...
The last two PI come from trinidad directly. The first one is the rendered
result out of the JSP.
The JSP looks like:
<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:tr="http://myfaces.apache.org/trinidad">
<jsp:text><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>]]></jsp:text>
<f:view>
<tr:document title="test">
...
It seems that the jsp servlet pushes its <jsp:text>-content (in this case the
XML-PI) into the response before the PPR engine filters the rendered page.
As a workaround I put the <jsp:text> element into the <f:view> (not above it).
So
It is rendered at the beginning of the document but is filtered out during PPR.
The XML-PI which comes from trinidad should use the encoding attribute.
Otherwise PPR may fail for documents encoded other than UTF-8.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.