[
https://issues.apache.org/jira/browse/SLING-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659658#action_12659658
]
Felix Meschberger commented on SLING-547:
-----------------------------------------
I assume, this is still an issue ?
You could try a workaround which is based on the StreamRendererServlet also
being registered for the ".res" extension. So instead of including
"/content/header.html" you would include "/content/header.html.res".
This causes the /content/header.html resource to be included with the extension
"res", which in turn would select the StreamRendererServlet.
> Included header.html (node of type nt:file) through a script sling.include
> uses HtmlRendererServlet instead of StreamRendererServlet
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-547
> URL: https://issues.apache.org/jira/browse/SLING-547
> Project: Sling
> Issue Type: Bug
> Components: Scripting, Servlets Get
> Affects Versions: Servlets Get 2.0.2, Scripting Core 2.0.2
> Environment: Ubuntu 8.04, Java 1.6
> Reporter: Bryce Ewing
> Priority: Minor
>
> Hi,
> Well at least I think that this is a bug. The ScriptHelper.include method
> says that it includes the "output of another request" which I would have
> thought meant that if I included "/content/include/header.html" this would do
> the same thing as if I requested
> http://localhost:8080/content/include/header.html. In this case the
> header.html file is a snippet of html that has been loaded as a file (i.e.
> with type nt:file). When I request the file directly as
> http://localhost:8080/content/include/header.html I get the file streamed
> directly using StreamRendererServlet, but from an include this instead uses
> the extension from the original request (which was for a html rendered view
> of a node) and then uses the HtmlRendererServlet.
> I would make a suggestion as to where a fix to this could be applied but got
> myself a little bogged down in the details of this, not sure if something
> like checking the node type, and if it is a file that already matches the
> extension then stream it might work? Or maybe a different request object
> needs to be created for this "request".
> Cheers
> Bryce
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.