You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2025/05/09 15:52:17 UTC
(sling-org-apache-sling-servlets-resolver) branch master updated: SLING-12643 : Support Jakarta ServletAPI in Scripting
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-resolver.git
The following commit(s) were added to refs/heads/master by this push:
new 6828337 SLING-12643 : Support Jakarta ServletAPI in Scripting
6828337 is described below
commit 682833706b725a2504c0981d4f90b99c1dc5b2da
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri May 9 18:52:12 2025 +0300
SLING-12643 : Support Jakarta ServletAPI in Scripting
---
pom.xml | 2 +-
.../servlets/resolver/internal/bundle/BundledScriptServlet.java | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index e945aeb..4a866fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.scripting.spi</artifactId>
- <version>1.0.4</version>
+ <version>2.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/BundledScriptServlet.java b/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/BundledScriptServlet.java
index d6bcccd..bc7c0f8 100644
--- a/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/BundledScriptServlet.java
+++ b/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/BundledScriptServlet.java
@@ -33,8 +33,6 @@ import org.apache.sling.api.SlingException;
import org.apache.sling.api.SlingJakartaHttpServletRequest;
import org.apache.sling.api.SlingJakartaHttpServletResponse;
import org.apache.sling.api.resource.type.ResourceType;
-import org.apache.sling.api.wrappers.JakartaToJavaxRequestWrapper;
-import org.apache.sling.api.wrappers.JakartaToJavaxResponseWrapper;
import org.apache.sling.scripting.spi.bundle.BundledRenderUnit;
import org.apache.sling.scripting.spi.bundle.TypeProvider;
import org.jetbrains.annotations.NotNull;
@@ -78,9 +76,7 @@ public class BundledScriptServlet extends GenericServlet {
RequestWrapper requestWrapper = new RequestWrapper(request, types);
try {
- executable.eval(
- JakartaToJavaxRequestWrapper.toJavaxRequest(requestWrapper),
- JakartaToJavaxResponseWrapper.toJavaxResponse(response));
+ executable.eval(requestWrapper, response);
} catch (RuntimeException see) {
// log in the request progress tracker