You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dan Zehme (JIRA)" <my...@incubator.apache.org> on 2005/07/21 16:35:45 UTC

[jira] Created: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

JSF tags do not use the pageContext for the tag for output
----------------------------------------------------------

         Key: MYFACES-348
         URL: http://issues.apache.org/jira/browse/MYFACES-348
     Project: MyFaces
        Type: Bug
    Versions: 1.0.9 beta    
 Environment: Windows 2000, JBoss and Weblogic
    Reporter: Dan Zehme


When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.

This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:

add to  _PageContextOutWriter:

public PageContext getPageContext() { return _pageContext }


in UIComponentTag, add:

private ResponseWriter _pushedWriter = false;


in UIComponentTag.setupResponseWriter() before null check add:

if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
  // PageContext has changed; push the Writer
  _pushedWriter = _writer;
  _writer = null;
}


at start of UIComponentTag.doEndTag() add:

if (_pushedWriter != null) {
  // Restore the previous writer
  _writer = _pushedWriter
  _pushedWriter = null;
  FacesContext facesContext = getFacesContext();
  facesContext.setResponseWriter(_writer);
}





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Dan Zehme (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-348?page=comments#action_12319626 ] 

Dan Zehme commented on MYFACES-348:
-----------------------------------

I looked at the current JSF 1.2 source and they have not solved this problem.  They are still one step behind MyFaces in that they are still using the Writer from the response and not the PageContext's out.  I will probably try to create a similar "fix" for thier code base, but it is more complicated than what I have proposed here.


> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-348?page=comments#action_12319312 ] 

Martin Marinschek commented on MYFACES-348:
-------------------------------------------

There is a fix for this problem planned in JSF1.2.

Do you know if this is the same fix as you are proposing here?

If yes, we should implement this right away...

regards,

Martin

> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-348?page=all ]

Bruno Aranda updated MYFACES-348:
---------------------------------

    Component: JSF 1.1

> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Adam Winer (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-348?page=comments#action_12319727 ] 

Adam Winer commented on MYFACES-348:
------------------------------------

Unfortunately, Dan hasn't solved much here.  (If the Content Interweaving problems were this easily solved, the EG would have done so in JSF 1.0, not JSF 1.2.)

This does not solve the need for <f:verbatim>.  For example, try plain HTML content inside of <h:panelGrid> with his fix.  The problem is not one of *which* Writer you're writing to, but *when* you write to the Writer.

His patch is correct, but it only serves to keep BodyTags working correctly with MyFaces.

Dan is also wrong about JSF 1.2 being "a step behind MyFaces";  it uses an entirely different strategy for outputting the content.  The entire tree is gathered in one step, including all non-JSF content, using proper writers off of the pageContext;  then after the JSP completes, the Writer from the response is used to output the entire tree.

> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-348?page=comments#action_12319729 ] 

Martin Marinschek commented on MYFACES-348:
-------------------------------------------

Good. Thanks for the evaluation.

Forget my reply e-mail on the dev list then.

regards,

Martin

> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-348?page=all ]
     
Martin Marinschek closed MYFACES-348:
-------------------------------------

    Resolution: Invalid

Doesn't fix the content interweaving problem - as Adam Winer has evaluated. 

Thanks to Dan for the feedback, anyways.

regards,

Martin

> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-348?page=comments#action_12319686 ] 

Martin Marinschek commented on MYFACES-348:
-------------------------------------------

Interesting.

I thought this was marked to be fixed in JSF 1.2, it might still be a different fix they are proposing.

Craig, Adam, Manfred, can I get you to have a look at this proposal and tell me if it would line up with what the JSF 1.2 spec recommends?

regards,

Martin

> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-348?page=comments#action_12319367 ] 

Martin Marinschek commented on MYFACES-348:
-------------------------------------------

Care to see what the RI for JSF 1.2 is doing in this case?

if the fixes are similar, we will be patching right away, if not, we will need to wait and implement the JSF 1.2 way of doing things to stay compatible...

regards,

Martin

> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-348) JSF tags do not use the pageContext for the tag for output

Posted by "Dan Zehme (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-348?page=comments#action_12319362 ] 

Dan Zehme commented on MYFACES-348:
-----------------------------------

I do not know what is proposed for JSF 1.2.  This fix was independently developed.

Thanks,
Dan



> JSF tags do not use the pageContext for the tag for output
> ----------------------------------------------------------
>
>          Key: MYFACES-348
>          URL: http://issues.apache.org/jira/browse/MYFACES-348
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Windows 2000, JBoss and Weblogic
>     Reporter: Dan Zehme

>
> When the JSF tags write to the output stream, they get the ResponseWriter from the FacesContext.  This ResponseWriter is set up using pageContext of the first tag encountered during the processing of a request.  If JSF controls are used with JSP pages that are included, the result is that the JSF output often appears before the JSP output that the JSF output should have been mixed with. This is because the included pages have a new PageContext and therefore the wrong JspWriter is used.  This problem is described in Hans Bergsten's book "Java Server Faces" on pages 218-219.  This is also the reason for the <f:verbatim> tag.
> This problem can be eliminated and the use of the <f:verbatim> tag removed if the UIComponentTag.doStart/doEnd would push/pop ResponseWriters based on changes to the pageContext.  More explicitly:
> add to  _PageContextOutWriter:
> public PageContext getPageContext() { return _pageContext }
> in UIComponentTag, add:
> private ResponseWriter _pushedWriter = false;
> in UIComponentTag.setupResponseWriter() before null check add:
> if (_writer instanceof _PageContextOutWriter && ((_PageContextOutWriter)_writer).getPageContext() != pageContext) {
>   // PageContext has changed; push the Writer
>   _pushedWriter = _writer;
>   _writer = null;
> }
> at start of UIComponentTag.doEndTag() add:
> if (_pushedWriter != null) {
>   // Restore the previous writer
>   _writer = _pushedWriter
>   _pushedWriter = null;
>   FacesContext facesContext = getFacesContext();
>   facesContext.setResponseWriter(_writer);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira