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

Felix Meschberger closed SLING-19.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

The reason for this problem is an incomplete adaption to a new situation: 
Initially the Component API was separate from the Servlet API. Nowadays the 
Component API extends the Servlet API. So formerly, we had to create Servlet 
Adapters to  adapt servlets into Sling.

As this now is not required any more this adaption is not required on this 
level anymore, as the Serlvet.service method may directly be called because the 
ComponentRequest extends HttpServletRequest extends ServletRequest and the same 
for the response objects.

So, the former adapter is now removed and the JspServletWrapperAdapter directly 
implements the correct API to be called by the ScriptedComponent.

Fixed in Rev 578588.

> stackoverflow trying to run jsp scripting
> -----------------------------------------
>
>                 Key: SLING-19
>                 URL: https://issues.apache.org/jira/browse/SLING-19
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Edgar Poce
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> the method HttpServletAdapter.service() runs an endless loop
> proposed patch
> Index: 
> /home/epoce/hd2/projects/sling/trunk/scripting-core/src/main/java/org/apache/sling/scripting/HttpServletAdapter.java
> ===================================================================
> --- 
> /home/epoce/hd2/projects/sling/trunk/scripting-core/src/main/java/org/apache/sling/scripting/HttpServletAdapter.java
>       (revision 578464)
> +++ 
> /home/epoce/hd2/projects/sling/trunk/scripting-core/src/main/java/org/apache/sling/scripting/HttpServletAdapter.java
>       (working copy)
> @@ -48,7 +48,7 @@
>          Object oldResponse = Util.replaceAttribute(request, 
> Util.ATTR_RENDER_RESPONSE, response);
>  
>          try {
> -            this.service(request, response);
> +            this.service((HttpServletRequest) request, (HttpServletResponse) 
> response);
>          } catch (IOException ioe) {
>              // forward
>              throw ioe;

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

Reply via email to