myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Myfaces Wiki] Update of "Tiles and JSF" by SimonKitching
Date Fri, 18 Nov 2005 02:35:24 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by SimonKitching:

The comment on the change is:
Note about out-of-order problem when using tiles and mixing JSF/non-JSF content

  mapping which simply forwards to a tile. This abstraction is removed at the cost of coupling
the viewId
  name directly to the tiles definition name.
+ == Out-of-order problems when mixing template text and JSF tags. ==
+ There is a known problem with JSF 1.1 and dynamic includes of pages (at least with the Apache
Tomcat servlet engine).
+ When a page is included from another page, a buffered response stream is created and passed
to the servlet which
+ handles the included page. Only after that page has been completely processed is the generated
output appended to
+ the response for the including page. However JSF components within the included page use

+ {{{
+   FacesContext.getCurrentInstance().getResponseWriter()
+ }}}
+ to determine where to write their output as they are rendered, and this mechanism isn't
aware of the buffer created
+ by the JSP include mechanism.
+ The result is that any output generated by JSF tags in the included page is appended to
the response before any plain
+ text or output generated by JSP tags in the included page. This usually results in an unusable
+ Unfortunately the whole point of Tiles is to perform dynamic includes to build pages, so
this can be a major problem when using Tiles.
+ Currently the only solution is to ensure that all output from the included page is generated
by JSF tags. This means wrapping all
+ plain text in <f:verbatim> tags, or using the [ htmlib
JSF library] (though that can have performance implications).
+ Note that this is a different issue than the one which causes out-of-order problems when
mixing JSF and non-JSF content within a JSF component which renders its children (eg a Panel).

View raw message