You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Lars Trieloff (JIRA)" <ji...@apache.org> on 2008/12/18 19:05:44 UTC

[jira] Updated: (SLING-789) Allow redirecting of one script's response into a String for a second script to process

     [ https://issues.apache.org/jira/browse/SLING-789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Trieloff updated SLING-789:
--------------------------------

    Attachment: SLING-789.patch

This patch extends SlingScriptHelper with an retrieve method that works just like the include method but returns a String. The implementation of this method creates an ServletResponseWrapper to record the output stream and to make it available as a String return value.

> Allow redirecting of one script's response into a String for a second script to process
> ---------------------------------------------------------------------------------------
>
>                 Key: SLING-789
>                 URL: https://issues.apache.org/jira/browse/SLING-789
>             Project: Sling
>          Issue Type: Improvement
>          Components: API, Scripting
>            Reporter: Lars Trieloff
>         Attachments: SLING-789.patch
>
>
> I have a use case where I want to create a script that takes the output of another script and admonishes it. For the simple case where I just want to add some content before and after the original script SlingScriptHelper.include is sufficient, but if I have to deal with the output, e.g. to add additional escaping, it would be helpful to be able to redirect the response body of one script into a String variable of another script, just like the import tag in JSTL does.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.