[
https://issues.apache.org/jira/browse/SLING-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616409#action_12616409
]
Felix Meschberger commented on SLING-567:
-----------------------------------------
IMHO the reported behaviour is not a bug but expected behaviour related to
writer buffering during JSP processing.
A JSP has an out variable which is a buffering JspWriter backed by the request
writer. In your reported case, the first JSP writes to the JspWriter which
buffers the data but does not flush it to the underlying request writer. The
the imported script is called which writes data to its own JspWriter backed by
the request writer. When the script ends, the JspWriter is flushed into the
request writer. Only when the first script ends, is its JspWriter flushed into
the the PrintWriter....
The "workaround" is not really a workaround but the way how it goes. This is
why the flush attribute is present.
The jsp:include tag works exactly the same.
So I think, we should rather close this issue as wors as expetced.
> sling.include inclides fragments in the wrong order
> ---------------------------------------------------
>
> Key: SLING-567
> URL: https://issues.apache.org/jira/browse/SLING-567
> Project: Sling
> Issue Type: Bug
> Affects Versions: Scripting JSP 2.0.2
> Reporter: Michael Marth
>
> (This is observed in revision 670551)
> consider a jsp "/apps/myapp/a.jsp" which contains:
> aaa
> <% sling.include(currentNode.getPath() + ".b.html"); %>
> and another jsp "/apps/myapp/b.jsp" which contains
> bbb
> if i execute /content/myapp/mynode.a.html i get
> bbb
> aaa
> expected result is:
> aaa
> bbb
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.