You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Justin Edelson (JIRA)" <ji...@apache.org> on 2017/10/02 17:41:00 UTC
[jira] [Resolved] (SLING-7174) Using MockSlingHttpServletRequest
for In-Sling Rendering fails when used with Export Servlet
[ https://issues.apache.org/jira/browse/SLING-7174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Edelson resolved SLING-7174.
-----------------------------------
Resolution: Fixed
> Using MockSlingHttpServletRequest for In-Sling Rendering fails when used with Export Servlet
> --------------------------------------------------------------------------------------------
>
> Key: SLING-7174
> URL: https://issues.apache.org/jira/browse/SLING-7174
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Environment: Sling 9, Java 1.8
> Reporter: Andreas Schaefer
> Assignee: Justin Edelson
> Fix For: Servlet Helpers 1.1.2, Sling Models Impl 1.4.6
>
>
> When I use MockSlingHttpServletRequest with SlingRequestProcessor to render a page within sling then I will get an Unsupported Operation Exception when I hit the Export Servlet.
> The reason is that the Export Servlet is retrieving Request Reader in addScriptBindings():
> bindings.put(READER, request.getReader());
> In my opinion Sling should provide a Request / Response class for in-Sling rendering that is for that specific purpose as using that class for testing does clash with the the rendering.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)