Ah, Max Staret's comment on that jira issue explains why jsp/jspx could make a 
difference.

When using a jsp page it's easy to accidentally cause whitespace to be written 
to the response at the start of the page.

And the whitespace output at the start is what is killing PPR. If an xml 
document has an "<?xml" declaration in it, it must be the first thing - without 
even whitespace coming first. If whitespace is there first, then it isn't a 
valid xml document.

The jspx format is much more resistant to this as there is a tag (jsp:root) 
that clearly marks the start of the content.

So yes, facelets should also be immune to this problem as it also controls 
whitespace better.

Cheers,

Simon

---- Oscar Reitsma <[EMAIL PROTECTED]> schrieb:
> Hi Simon,
> 
> I am 99% sure it was the move to jspx that did the trick, where 1% is always
> left for an arbitrary CPU transistor malfunction :-)
> 
> refer to this:
> https://issues.apache.org/jira/browse/TRINIDAD-802
> 
> By the looks of things though it may not be the issue when using facelets
> 1.1.14, but good to keep in mind anyway.
> 
> thanks,
> Oscar
> 
> On Nov 13, 2007 10:54 AM, Simon Kitching <[EMAIL PROTECTED]> wrote:
> 
> > Hi,
> >
> > Are you sure jspx has something to do with it?
> >
> > As I understand it, both jsp and jspx result in a servlet being generated.
> > They are just different input formats to the jsp "compiler", but in the end
> > exactly the same servlet class should be created in either case. And it is
> > that servlet class that then actually invokes all the JSF classes and other
> > content.
> >
> > I therefore cannot see why switching from jsp to jspx would make any
> > difference at all.
> >
> > Using jspx does potentially point out bugs in a jsp page that otherwise go
> > unnoticed (bad tag nesting etc). So maybe moving to jspx forced you to fix
> > those bugs, and so the page started working?
> >
> > Regards,
> >
> > Simon
> >
> > ---- Oscar Reitsma <[EMAIL PROTECTED]> schrieb:
> > > This may help or not, sounds like there has been more discussion on this
> > > issue.
> > >
> > > We had problems with PPR in all versions above 1.0.1 because we weren't
> > > using jspx:
> > > i.e. use something like this:
> > >
> > > <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
> > > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"; version="2.0"
> > >     xmlns:f="http://java.sun.com/jsf/core";
> > >     xmlns:tr="http://myfaces.apache.org/trinidad";>
> > >
> > >     <jsp:directive.page contentType="text/html;charset=utf-8" />
> > >
> > >     <f:view>
> > >         <f:loadBundle basename="com.cyest.spms.resources.messages"
> > > var="msgs" />
> > >         <tr:document>
> > >             <tr:form>
> > >             </tr:form>
> > >         </tr:document>
> > >     </f:view>
> > > </jsp:root>
> > >
> > > Regards,
> > > Oscar
> > >
> > > On Nov 13, 2007 1:42 AM, Francisco Passos <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > Thank you, it's reassuring to know that it's not forgotten :)
> > > >
> > > > Francisco
> > > >
> > > >
> > > > On Nov 12, 2007 8:23 PM, Matthias Wessendorf <[EMAIL PROTECTED] >
> > wrote:
> > > >
> > > > > We'll look at it. Got a demo application, that shows the issue.
> > > > > Have to check it. But not fixed in 1.0.4.
> > > > >
> > > > > I am not able to reproduce it in my environment, just in this demo.
> > > > > Hadn't had much time to check, but I'll check it.
> > > > >
> > > > > -Matthias
> > > > >
> > > > > On Nov 12, 2007 8:34 PM, Francisco Passos <
> > [EMAIL PROTECTED]>
> > > > > wrote:
> > > > > > Sorry to bother, but I was wondering if this issue has had
> > > > > developments and
> > > > > > if so, if it has been addressed in version 1.0.4.
> > > > > >
> > > > > > Thank you,
> > > > > > Francisco
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Nov 2, 2007 5:15 PM, shhQuiet < [EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > I am having this problem, using Facelets 1.1.14 and any version
> > of
> > > > > > Trinidad
> > > > > > > greater than 1.0.1.
> > > > > > >
> > > > > > > I believe the cause is that the xml PPR response has a content
> > type
> > > > > of
> > > > > > > "text/html".
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Bertrand, Shawn R wrote:
> > > > > > > >
> > > > > > > > During the PPR request, do you happen to disable the component
> > > > > which
> > > > > > > > originated the request?
> > > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > View this message in context:
> > > > > >
> > > > >
> > http://www.nabble.com/-Trinidad--Update-from-1.0.1-to-1.0.3-breaks-PPR-tf4634155.html#a13551730
> > > > > > > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matthias Wessendorf
> > > > >
> > > > > further stuff:
> > > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > > mail: matzew-at-apache-dot-org
> > > > >
> > > >
> > > >
> >
> >

Reply via email to