incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r654477 - /incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspServletWrapperAdapter.java
Date Thu, 08 May 2008 11:14:45 GMT
Author: cziegeler
Date: Thu May  8 04:14:45 2008
New Revision: 654477

URL: http://svn.apache.org/viewvc?rev=654477&view=rev
Log:
Restore old attribute value after execution.

Modified:
    incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspServletWrapperAdapter.java

Modified: incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspServletWrapperAdapter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspServletWrapperAdapter.java?rev=654477&r1=654476&r2=654477&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspServletWrapperAdapter.java
(original)
+++ incubator/sling/trunk/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspServletWrapperAdapter.java
Thu May  8 04:14:45 2008
@@ -52,7 +52,8 @@
      *             request parameter has an illegal value.
      */
     public void service(SlingScriptHelper scriptHelper) {
-        SlingHttpServletRequest request = scriptHelper.getRequest();
+        final SlingHttpServletRequest request = scriptHelper.getRequest();
+        final Object oldValue = request.getAttribute(SlingScriptHelper.class.getName());
         try {
             request.setAttribute(SlingScriptHelper.class.getName(), scriptHelper);
             service(request, scriptHelper.getResponse(), preCompile(request));
@@ -64,7 +65,7 @@
         } catch (ServletException se) {
             throw new SlingServletException(se);
         } finally {
-            request.removeAttribute(SlingScriptHelper.class.getName());
+            request.setAttribute(SlingScriptHelper.class.getName(), oldValue);
         }
     }
 



Mime
View raw message