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/02/02 09:41:32 UTC

(sling-org-apache-sling-api) branch master updated: SLING-12604 : Enhance Sling API to support Jakarta Servlet (#55)

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-api.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b2718c  SLING-12604 : Enhance Sling API to support Jakarta Servlet (#55)
7b2718c is described below

commit 7b2718c53aa0557af0a943b4eb85e523639c5db5
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Feb 2 10:41:28 2025 +0100

    SLING-12604 : Enhance Sling API to support Jakarta Servlet (#55)
    
    * Provide additional API to support jakarta.servlet
    
    * Increase package versions, deprecate javax.servlet functionality
    
    * Use Jakarta in interface names, fix javadoc
    
    * Added more jakarta based interfaces
    
    * Provide alternatives for all api
    
    * Implement builders and update tests
    
    * Update todo list, add wrappers for request/response
    
    * Add utility methods to create request/response wrappers
    
    * Update status and fix JakartaErrorHandler
    
    * Implement utility method to wrap request/response
    
    * Add wrappers for servlets and filters
    
    * Correct class name
    
    * Update javadocs and tests
    
    * Handle servlet config being null
    
    * Update README.md
    
    Co-authored-by: Jörg Hoh <jo...@users.noreply.github.com>
    
    * Update README.md
    
    Co-authored-by: Jörg Hoh <jo...@users.noreply.github.com>
    
    * Update src/main/java/org/apache/sling/api/SlingConstants.java
    
    Co-authored-by: Jörg Hoh <jo...@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Jörg Hoh <jo...@users.noreply.github.com>
---
 README.md                                          |  53 +-
 pom.xml                                            |  23 +-
 .../java/org/apache/sling/api/SlingConstants.java  |  61 ++-
 .../apache/sling/api/SlingHttpServletRequest.java  |   3 +
 .../apache/sling/api/SlingHttpServletResponse.java |   3 +
 ...st.java => SlingJakartaHttpServletRequest.java} |   8 +-
 ...e.java => SlingJakartaHttpServletResponse.java} |   6 +-
 .../apache/sling/api/SlingServletException.java    |  16 +-
 .../org/apache/sling/api/auth/Authenticator.java   |  30 +-
 .../api/auth/NoAuthenticationHandlerException.java |   4 +-
 .../org/apache/sling/api/auth/package-info.java    |   2 +-
 .../java/org/apache/sling/api/package-info.java    |   2 +-
 .../org/apache/sling/api/request/RequestUtil.java  |  98 +++-
 ...estEvent.java => SlingJakartaRequestEvent.java} |  12 +-
 ...tener.java => SlingJakartaRequestListener.java} |  11 +-
 .../sling/api/request/SlingRequestEvent.java       |   2 +
 .../sling/api/request/SlingRequestListener.java    |   2 +
 .../apache/sling/api/request/builder/Builders.java |   8 +-
 .../builder/SlingHttpServletRequestBuilder.java    |  84 ++-
 .../builder/SlingHttpServletResponseBuilder.java   |  11 +
 .../builder/SlingHttpServletResponseResult.java    |   2 +
 ... => SlingJakartaHttpServletResponseResult.java} |  10 +-
 .../api/request/builder/impl/HttpSessionImpl.java  |  45 +-
 .../request/builder/impl/ServletContextImpl.java   |  82 +--
 .../impl/SlingHttpServletRequestBuilderImpl.java   | 479 ++++++++++++++++
 .../builder/impl/SlingHttpServletRequestImpl.java  | 535 ++++--------------
 .../impl/SlingHttpServletResponseBuilderImpl.java  |  53 ++
 ...ava => SlingHttpServletResponseResultImpl.java} |  43 +-
 .../impl/SlingJakartaHttpServletRequestImpl.java   | 608 +++++++++++++++++++++
 ...SlingJakartaHttpServletResponseResultImpl.java} |  69 +--
 .../sling/api/request/builder/package-info.java    |   2 +-
 ...iaRangeList.java => JakartaMediaRangeList.java} |  15 +-
 .../sling/api/request/header/MediaRangeList.java   |   1 +
 .../sling/api/request/header/package-info.java     |   2 +-
 .../org/apache/sling/api/request/package-info.java |   2 +-
 .../org/apache/sling/api/resource/Resource.java    |   2 +-
 .../sling/api/resource/ResourceResolver.java       | 104 +++-
 .../sling/api/resource/mapping/ResourceMapper.java |  82 ++-
 .../sling/api/resource/mapping/package-info.java   |   2 +-
 .../apache/sling/api/resource/package-info.java    |   2 +-
 .../api/scripting/ScriptEvaluationException.java   |   2 +-
 .../apache/sling/api/scripting/SlingBindings.java  |   2 +
 ...lingBindings.java => SlingJakartaBindings.java} |  59 +-
 .../{SlingScript.java => SlingJakartaScript.java}  |  21 +-
 ...ptHelper.java => SlingJakartaScriptHelper.java} |  24 +-
 .../apache/sling/api/scripting/SlingScript.java    |   2 +
 .../sling/api/scripting/SlingScriptHelper.java     |   2 +
 .../apache/sling/api/scripting/package-info.java   |   2 +-
 .../apache/sling/api/servlets/ErrorHandler.java    |   2 +
 ...{ErrorHandler.java => JakartaErrorHandler.java} |  17 +-
 ...ptingServlet.java => JakartaOptingServlet.java} |  15 +-
 .../apache/sling/api/servlets/OptingServlet.java   |   4 +-
 .../apache/sling/api/servlets/ServletResolver.java | 108 +++-
 .../api/servlets/ServletResolverConstants.java     |   2 +-
 .../sling/api/servlets/SlingAllMethodsServlet.java |   2 +
 ...let.java => SlingJakartaAllMethodsServlet.java} |  39 +-
 ...et.java => SlingJakartaSafeMethodsServlet.java} | 120 ++--
 .../api/servlets/SlingSafeMethodsServlet.java      |   2 +
 .../apache/sling/api/servlets/package-info.java    |   2 +-
 .../org/apache/sling/api/uri/SlingUriBuilder.java  | 148 +++--
 .../org/apache/sling/api/uri/package-info.java     |   2 +-
 .../api/wrappers/JakartaToJavaxFilterWrapper.java  | 105 ++++
 .../api/wrappers/JakartaToJavaxRequestWrapper.java | 191 +++++++
 .../wrappers/JakartaToJavaxResponseWrapper.java    |  77 +++
 .../api/wrappers/JakartaToJavaxServletWrapper.java | 117 ++++
 .../api/wrappers/JavaxToJakartaFilterWrapper.java  | 105 ++++
 .../api/wrappers/JavaxToJakartaRequestWrapper.java | 190 +++++++
 .../wrappers/JavaxToJakartaResponseWrapper.java    |  77 +++
 .../api/wrappers/JavaxToJakartaServletWrapper.java | 117 ++++
 .../api/wrappers/ResourceResolverWrapper.java      |  33 +-
 .../wrappers/SlingHttpServletRequestWrapper.java   |   2 +
 .../wrappers/SlingHttpServletResponseWrapper.java  |   2 +
 ... => SlingJakartaHttpServletRequestWrapper.java} |  25 +-
 ...=> SlingJakartaHttpServletResponseWrapper.java} |  25 +-
 .../sling/api/wrappers/SlingRequestPaths.java      | 104 +++-
 .../apache/sling/api/wrappers/package-info.java    |   2 +-
 .../apache/sling/api/request/RequestUtilTest.java  | 188 +------
 .../request/builder/impl/HttpSessionImplTest.java  |  10 -
 .../builder/impl/ServletContextImplTest.java       |  38 +-
 .../impl/SlingHttpServletRequestImplTest.java      | 138 ++---
 .../impl/SlingHttpServletResponseImplTest.java     |  64 ++-
 ...=> SlingJakartaHttpServletRequestImplTest.java} | 155 +++---
 ...> SlingJakartaHttpServletResponseImplTest.java} |  79 ++-
 ...istTest.java => JakartaMediaRangeListTest.java} |  24 +-
 .../api/request/header/MediaRangeListTest.java     |   1 +
 .../sling/api/resource/ResourceUtilTest.java       |  10 +-
 .../apache/sling/api/uri/SlingUriBuilderTest.java  | 101 +++-
 .../api/wrappers/ResourceResolverWrapperTest.java  |  52 +-
 88 files changed, 3798 insertions(+), 1390 deletions(-)

diff --git a/README.md b/README.md
index 5160280..0508c86 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,61 @@
 
 This module is part of the [Apache Sling](https://sling.apache.org) project.
 
-The Sling API defines an extension to the Servlet API 3.0 to
+The Sling API defines an extension to the Jakarta Serlvet API 6.0 to
 provide access to content and unified access to request
 parameters hiding the differences between the different methods
 of transferring parameters from client to server. Note that the
 Sling API bundle does not include the Servlet API but instead
 requires the API to be provided by the Servlet container in
 which the Sling framework is running or by another bundle.
+
+## Updating to Sling API 3
+
+Sling API 3 adds support for Jakarta Servlet API. Updating to the latest API version should just be a drop-in replacement. However, there are some points to considers.
+
+### Dependency to Jakarta Servlet API
+
+As the API references the Jakarta Servlet API in several signatures, it is very likely that you need to add the Jakarta Servlet API to the dependency list of your project. And that is in addition to the already existing dependency to the Javax Servlet API.
+
+Add a dependency like `jakarta.servlet:jakarta.servlet-api:6.0.0` to your project.
+
+At runtime, you need a container implementing the Jakarta Servlet API. For example, you can use Apache Felix Http Jetty 12.
+
+### Minimum Java Runtime
+
+As the Jakarta Servlet API requires Java 17, the Sling API now requires Java 17 as a minimum Java version at runtime as well.
+
+### Source Code Incompatibilties
+
+For some methods where a Javax Servlet Type is used in the signature, an alternative method has been added with the same name but different signature. This can lead to compilation errors due to disambigutie *if* the actual argument is `null`. However, all of these methods do not allow `null` as an argument, therefore this should not create a problem in reality.
+
+If such compilation error occurs nevertheless, a quick (but wrong) fix is to cast `null` to the Jakarta Servlet API type. However, the correct fix is to not call this method with a `null` argument at all and change the code accordingly.
+
+## Migrating from Servlet API 3 to Jakarta Servlet API 6
+
+With the release of Sling API Version 3, the Jakarta Servlet API is used as the base. Previous releases are based on the Javax Servlet API 3. While the API based on Servlet 3 is still available and functional, it is mainly there for compatiblity. All new code should leverage Jakarta Servelt API and it is advised to migrate existing code.
+
+In most cases, the migration is as simply as a series of search and replace operations. For Sling API based on Servlet 3 there is an alternative with the same functionality based on Jakarta Servlet API. However, for API that has been deprecated already, there is no alternative. Therefore, all usage of deprecated Sling API needs to be replaced first.
+
+The following table lists the replacements:
+
+| Feature | Servlet API 3 | Jakarta Servlet API 6 |
+| ------- | -------------- | --------------------- |
+| Package Prefix | `javax.servlet` | `jakarta.servlet` |
+| Request Interface | SlingHttpServletRequest | SlingJakartaHttpServletRequest |
+| Response Interface | SlingHttpServletResponse | SlingJakartaHttpServletResponse |
+| Event Interface | SlingRequestEvent | SlingJakartaRequestEvent |
+| Event Listener | SlingRequestListener | SlingJakartaRequestListener |
+| Builders | SlingHttpServletRequestBuilder.build() | SlingHttpServletRequestBuilder.buildJakartaRequest() |
+| Builders | SlingHttpServletResponseBuilder.build() | SlingHttpServletResponseBuilder.buildJakartaResponse() |
+| Builders | SlingHttpServletResponseResult | SlingJakartaHttpServletResponseResult |
+| Media Range | MediaRangeList | JakartaMediaRangeList |
+| Scripting | SlingBindings | SlingJakartaBindings |
+| Scripting | SlingScript | SlingJakartaScript |
+| Scripting | SlingScriptHelper | SlingJakartaScriptHelper |
+| Error Handling | ErrorHandler | JakartaErrorHandler |
+| Scripting | OptingServlet | JakartaOptinServlet |
+| Scripting | SlingAllMethodsServlet | SlingJakartaAllMethodsServlet |
+| Scripting | SlingSafeMethodsServlet | SlingJakartaSafeMethodsServlet |
+| Wrapper | SlingHttpServletRequestWrapper | SlingJakartaHttpServletRequestWrapper |
+| Wrapper | SlingHttpServletResponseWrapper | SlingJakartaHttpServletResponseWrapper |
diff --git a/pom.xml b/pom.xml
index a4fec49..7e12c50 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,12 +28,12 @@
     </parent>
 
     <artifactId>org.apache.sling.api</artifactId>
-    <version>2.28.0-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
 
     <name>Apache Sling API</name>
     <description>
-        The Apache Sling API defines an extension to the Servlet
-        API 2.4 to provide access to content and unified access
+        The Apache Sling API defines an extension to the Jakarta Servlet
+        API 6.0 to provide access to content and unified access
         to request parameters hiding the differences between the
         different methods of transferring parameters from client
         to server. Note that the Apache Sling API bundle does not
@@ -50,7 +50,7 @@
 
     <properties>
         <site.jira.version.id>12314252</site.jira.version.id>
-        <sling.java.version>8</sling.java.version>
+        <sling.java.version>17</sling.java.version>
         <project.build.outputTimestamp>2024-07-05T14:14:13Z</project.build.outputTimestamp>
     </properties>
 
@@ -60,7 +60,18 @@
             <artifactId>javax.servlet-api</artifactId>
             <scope>provided</scope>
         </dependency>
-
+        <dependency>
+            <groupId>jakarta.servlet</groupId>
+            <artifactId>jakarta.servlet-api</artifactId>
+            <version>6.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.http.wrappers</artifactId>
+            <version>1.1.8</version>
+            <scope>provided</scope>
+        </dependency>
         <!-- OSGi -->
         <dependency>
             <groupId>org.osgi</groupId>
@@ -129,7 +140,7 @@
             <scope>provided</scope> <!-- just used for javadoc link -->
         </dependency>
     </dependencies>
-    
+
     <build>
         <plugins>
             <plugin>
diff --git a/src/main/java/org/apache/sling/api/SlingConstants.java b/src/main/java/org/apache/sling/api/SlingConstants.java
index 275ef21..624c896 100644
--- a/src/main/java/org/apache/sling/api/SlingConstants.java
+++ b/src/main/java/org/apache/sling/api/SlingConstants.java
@@ -54,14 +54,27 @@ public class SlingConstants {
     public static final String NAMESPACE_URI_ROOT = "http://sling.apache.org/";
 
     /**
-     * The name of the request attribute containing the <code>Servlet</code>
+     * The name of the request attribute containing the <code>jakarta.servlet.Servlet</code>
+     * which included the servlet currently being active (value is
+     * "org.apache.sling.api.include.jakarta.servlet"). This attribute is only set if
+     * the servlet or script is included via
+     * <code>RequestDispatcher.include</code> from another servlet or script.
+     * <p>
+     * The type of the attribute value is <code>jakarta.servlet.Servlet</code>.
+     */
+    public static final String ATTR_REQUEST_JAKARTA_SERVLET = "org.apache.sling.api.include.jakarta.servlet";
+
+    /**
+     * The name of the request attribute containing the <code>javax.servlet.Servlet</code>
      * which included the servlet currently being active (value is
      * "org.apache.sling.api.include.servlet"). This attribute is only set if
      * the serlvet or script is included via
      * <code>RequestDispatcher.include</code> from another servlet or script.
      * <p>
      * The type of the attribute value is <code>javax.servlet.Servlet</code>.
+     * @deprecated Use {@link #ATTR_REQUEST_JAKARTA_SERVLET} instead
      */
+    @Deprecated
     public static final String ATTR_REQUEST_SERVLET = "org.apache.sling.api.include.servlet";
 
     /**
@@ -96,7 +109,8 @@ public class SlingConstants {
      * <code>Servlet</code> which included the servlet currently being active
      * (value is "javax.servlet.include.request_uri"). This attribute is only
      * set if the serlvet or script is included via
-     * <code>RequestDispatcher.include</code> from another servlet or script.
+     * <code>RequestDispatcher.include</code> from another servlet or script
+     * and the current servlet is of type <code>javax.servlet.Servlet</code>.
      * <p>
      * The type of the attribute value is <code>String</code>.
      * <p>
@@ -106,7 +120,9 @@ public class SlingConstants {
      * request processing servlet or script or from an included servlet or
      * script. This request attribute is set for compatibility with the Servlet
      * API specification.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_REQUEST_URI} instead
      */
+    @Deprecated
     public static final String ATTR_INCLUDE_REQUEST_URI = "javax.servlet.include.request_uri";
 
     /**
@@ -116,7 +132,8 @@ public class SlingConstants {
      * <code>Servlet</code> which included the servlet currently being active
      * (value is "javax.servlet.include.context_path"). This attribute is only
      * set if the serlvet or script is included via
-     * <code>RequestDispatcher.include</code> from another servlet or script.
+     * <code>RequestDispatcher.include</code> from another servlet or script
+     * and the current servlet is of type <code>javax.servlet.Servlet</code>.
      * <p>
      * The type of the attribute value is <code>String</code>.
      * <p>
@@ -126,7 +143,9 @@ public class SlingConstants {
      * request processing servlet or script or from an included servlet or
      * script. This request attribute is set for compatibility with the Servlet
      * API specification.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_CONTEXT_PATH} instead
      */
+    @Deprecated
     public static final String ATTR_INCLUDE_CONTEXT_PATH = "javax.servlet.include.context_path";
 
     /**
@@ -136,7 +155,8 @@ public class SlingConstants {
      * <code>Servlet</code> which included the servlet currently being active
      * (value is "javax.servlet.include.servlet_path"). This attribute is only
      * set if the serlvet or script is included via
-     * <code>RequestDispatcher.include</code> from another servlet or script.
+     * <code>RequestDispatcher.include</code> from another servlet or script
+     * and the current servlet is of type <code>javax.servlet.Servlet</code>.
      * <p>
      * The type of the attribute value is <code>String</code>.
      * <p>
@@ -146,7 +166,9 @@ public class SlingConstants {
      * request processing servlet or script or from an included servlet or
      * script. This request attribute is set for compatibility with the Servlet
      * API specification.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_SERVLET_PATH} instead
      */
+    @Deprecated
     public static final String ATTR_INCLUDE_SERVLET_PATH = "javax.servlet.include.servlet_path";
 
     /**
@@ -156,7 +178,8 @@ public class SlingConstants {
      * <code>Servlet</code> which included the servlet currently being active
      * (value is "javax.servlet.include.path_info"). This attribute is only set
      * if the serlvet or script is included via
-     * <code>RequestDispatcher.include</code> from another servlet or script.
+     * <code>RequestDispatcher.include</code> from another servlet or script
+     * and the current servlet is of type <code>javax.servlet.Servlet</code>.
      * <p>
      * The type of the attribute value is <code>String</code>.
      * <p>
@@ -165,7 +188,9 @@ public class SlingConstants {
      * called from the client request processing servlet or script or from an
      * included servlet or script. This request attribute is set for
      * compatibility with the Servlet API specification.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_PATH_INFO} instead
      */
+    @Deprecated
     public static final String ATTR_INCLUDE_PATH_INFO = "javax.servlet.include.path_info";
 
     /**
@@ -175,7 +200,8 @@ public class SlingConstants {
      * <code>Servlet</code> which included the servlet currently being active
      * (value is "javax.servlet.include.query_string"). This attribute is only
      * set if the serlvet or script is included via
-     * <code>RequestDispatcher.include</code> from another servlet or script.
+     * <code>RequestDispatcher.include</code> from another servlet or script
+     * and the current servlet is of type <code>javax.servlet.Servlet</code>.
      * <p>
      * The type of the attribute value is <code>String</code>.
      * <p>
@@ -185,7 +211,9 @@ public class SlingConstants {
      * request processing servlet or script or from an included servlet or
      * script. This request attribute is set for compatibility with the Servlet
      * API specification.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_QUERY_STRING} instead
      */
+    @Deprecated
     public static final String ATTR_INCLUDE_QUERY_STRING = "javax.servlet.include.query_string";
 
     // ---------- Error handling -----------------------------------------------
@@ -194,24 +222,29 @@ public class SlingConstants {
      * The name of the request attribute containing the exception thrown causing
      * the error handler to be called (value is
      * "javax.servlet.error.exception"). This attribute is only available to
-     * error handling servlets and only if an exception has been thrown causing
-     * error handling.
+     * error handling servlets based on <code>javax.servlet.Servlet</code> and
+     * only if an exception has been thrown causing error handling.
      * <p>
      * The type of the attribute value is <code>java.lang.Throwable</code>.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#ERROR_EXCEPTION} instead
      */
+    @Deprecated
     public static final String ERROR_EXCEPTION = "javax.servlet.error.exception";
 
     /**
      * The name of the request attribute containing the fully qualified class
      * name of the exception thrown causing the error handler to be called
      * (value is "javax.servlet.error.exception_type"). This attribute is only
-     * available to error handling servlets and only if an exception has been
-     * thrown causing error handling. This attribute is present for backwards
+     * available to error handling servlets based on <code>javax.servlet.Servlet</code>
+     * and only if an exception has been thrown causing error handling.
+     * This attribute is present for backwards
      * compatibility only. Error handling servlet implementors are advised to
      * use the {@link #ERROR_EXCEPTION Throwable} itself.
      * <p>
      * The type of the attribute value is <code>java.lang.String</code>.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#ERROR_EXCEPTION_TYPE} instead
      */
+    @Deprecated
     public static final String ERROR_EXCEPTION_TYPE = "javax.servlet.error.exception_type";
 
     /**
@@ -223,7 +256,9 @@ public class SlingConstants {
      * methods, this attribute contains the optional message.
      * <p>
      * The type of the attribute value is <code>java.lang.String</code>.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#ERROR_MESSAGE} instead
      */
+    @Deprecated
     public static final String ERROR_MESSAGE = "javax.servlet.error.message";
 
     /**
@@ -233,7 +268,9 @@ public class SlingConstants {
      * the <code>SlingHttpServletRequest.getRequestURI()</code> method.
      * <p>
      * The type of the attribute value is <code>java.lang.String</code>.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#ERROR_REQUEST_URI} instead
      */
+    @Deprecated
     public static final String ERROR_REQUEST_URI = "javax.servlet.error.request_uri";
 
     /**
@@ -242,7 +279,9 @@ public class SlingConstants {
      * "javax.servlet.error.servlet_name").
      * <p>
      * The type of the attribute value is <code>java.lang.String</code>.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#ERROR_SERVLET_NAME} instead
      */
+    @Deprecated
     public static final String ERROR_SERVLET_NAME = "javax.servlet.error.servlet_name";
 
     /**
@@ -257,7 +296,9 @@ public class SlingConstants {
      * should be sent.
      * <p>
      * The type of the attribute value is <code>java.lang.Integer</code>.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#ERROR_STATUS_CODE} instead
      */
+    @Deprecated
     public static final String ERROR_STATUS = "javax.servlet.error.status_code";
 
     /**
diff --git a/src/main/java/org/apache/sling/api/SlingHttpServletRequest.java b/src/main/java/org/apache/sling/api/SlingHttpServletRequest.java
index c7354f9..e78f9c9 100644
--- a/src/main/java/org/apache/sling/api/SlingHttpServletRequest.java
+++ b/src/main/java/org/apache/sling/api/SlingHttpServletRequest.java
@@ -61,8 +61,11 @@ import org.osgi.annotation.versioning.ProviderType;
  * <p>
  * Starting with Sling API 2.0.6, this interface als extends the
  * {@link Adaptable} interface.
+ *
+ * @deprecated Use {@link SlingJakartaHttpServletRequest} instead.
  */
 @ProviderType
+@Deprecated
 public interface SlingHttpServletRequest extends HttpServletRequest, Adaptable {
 
     /**
diff --git a/src/main/java/org/apache/sling/api/SlingHttpServletResponse.java b/src/main/java/org/apache/sling/api/SlingHttpServletResponse.java
index 59e023d..3137db6 100644
--- a/src/main/java/org/apache/sling/api/SlingHttpServletResponse.java
+++ b/src/main/java/org/apache/sling/api/SlingHttpServletResponse.java
@@ -32,8 +32,11 @@ import org.osgi.annotation.versioning.ProviderType;
  * <p>
  * Starting with Sling API 2.0.6, this interface also extends the
  * {@link Adaptable} interface.
+ *
+ * @deprecated Use {@link SlingJakartaHttpServletResponse} instead.
  */
 @ProviderType
+@Deprecated
 public interface SlingHttpServletResponse extends HttpServletResponse,
         Adaptable {
 
diff --git a/src/main/java/org/apache/sling/api/SlingHttpServletRequest.java b/src/main/java/org/apache/sling/api/SlingJakartaHttpServletRequest.java
similarity index 98%
copy from src/main/java/org/apache/sling/api/SlingHttpServletRequest.java
copy to src/main/java/org/apache/sling/api/SlingJakartaHttpServletRequest.java
index c7354f9..851e2ee 100644
--- a/src/main/java/org/apache/sling/api/SlingHttpServletRequest.java
+++ b/src/main/java/org/apache/sling/api/SlingJakartaHttpServletRequest.java
@@ -25,9 +25,9 @@ import java.util.ResourceBundle;
 
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.annotations.NotNull;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletRequest;
 
 import org.apache.sling.api.adapter.Adaptable;
 import org.apache.sling.api.request.RequestDispatcherOptions;
@@ -63,7 +63,7 @@ import org.osgi.annotation.versioning.ProviderType;
  * {@link Adaptable} interface.
  */
 @ProviderType
-public interface SlingHttpServletRequest extends HttpServletRequest, Adaptable {
+public interface SlingJakartaHttpServletRequest extends HttpServletRequest, Adaptable {
 
     /**
      * Returns the {@link Resource} object on whose behalf the servlet acts.
diff --git a/src/main/java/org/apache/sling/api/SlingHttpServletResponse.java b/src/main/java/org/apache/sling/api/SlingJakartaHttpServletResponse.java
similarity index 87%
copy from src/main/java/org/apache/sling/api/SlingHttpServletResponse.java
copy to src/main/java/org/apache/sling/api/SlingJakartaHttpServletResponse.java
index 59e023d..d563add 100644
--- a/src/main/java/org/apache/sling/api/SlingHttpServletResponse.java
+++ b/src/main/java/org/apache/sling/api/SlingJakartaHttpServletResponse.java
@@ -18,7 +18,7 @@
  */
 package org.apache.sling.api;
 
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
 
 import org.apache.sling.api.adapter.Adaptable;
 import org.osgi.annotation.versioning.ProviderType;
@@ -28,13 +28,13 @@ import org.osgi.annotation.versioning.ProviderType;
  * servlet in creating and sending a response to the client.
  * <p>
  * This interface is currently empty and merely exists to parallel the
- * {@link SlingHttpServletRequest} interface.
+ * {@link SlingJakartaHttpServletRequest} interface.
  * <p>
  * Starting with Sling API 2.0.6, this interface also extends the
  * {@link Adaptable} interface.
  */
 @ProviderType
-public interface SlingHttpServletResponse extends HttpServletResponse,
+public interface SlingJakartaHttpServletResponse extends HttpServletResponse,
         Adaptable {
 
 }
diff --git a/src/main/java/org/apache/sling/api/SlingServletException.java b/src/main/java/org/apache/sling/api/SlingServletException.java
index 834c6d0..b80dd11 100644
--- a/src/main/java/org/apache/sling/api/SlingServletException.java
+++ b/src/main/java/org/apache/sling/api/SlingServletException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.sling.api;
 
-import javax.servlet.ServletException;
+import jakarta.servlet.ServletException;
 
 /**
  * The <code>SlingServletException</code> is a runtime exception wrapper for
@@ -30,8 +30,22 @@ public class SlingServletException extends SlingException {
 
     private static final long serialVersionUID = 8666411662509951915L;
 
+    /**
+     * Create a new exception
+     * @param cause The cause
+     * @since 2.4.0
+     */
     public SlingServletException(ServletException cause) {
         super(cause);
     }
 
+    /**
+     * Create a new exception
+     * @param cause The cause
+     * @deprecated Use {@link #SlingServletException(ServletException)}
+     */
+    @Deprecated
+    public SlingServletException(javax.servlet.ServletException cause) {
+        super(cause);
+    }
 }
diff --git a/src/main/java/org/apache/sling/api/auth/Authenticator.java b/src/main/java/org/apache/sling/api/auth/Authenticator.java
index 6eea22c..f450a79 100644
--- a/src/main/java/org/apache/sling/api/auth/Authenticator.java
+++ b/src/main/java/org/apache/sling/api/auth/Authenticator.java
@@ -19,8 +19,8 @@
 package org.apache.sling.api.auth;
 
 import org.jetbrains.annotations.NotNull;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
 
 import org.osgi.annotation.versioning.ProviderType;
 
@@ -115,9 +115,23 @@ public interface Authenticator {
      * @throws NoAuthenticationHandlerException If the service cannot find a way
      *             to authenticate a request user.
      * @throws IllegalStateException If the response has already been committed.
+     * @since 1.1.0
      */
     void login(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response);
 
+    /**
+     * Tries to login a request user for the current request.
+     *
+     * @param request The object representing the client request.
+     * @param response The object representing the response to the client.
+     * @throws NoAuthenticationHandlerException If the service cannot find a way
+     *             to authenticate a request user.
+     * @throws IllegalStateException If the response has already been committed.
+     * @deprecated Use {@link #login(HttpServletRequest, HttpServletResponse)} instead.
+     */
+    @Deprecated
+    void login(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response);
+
     /**
      * Logs out if the current request is authenticated.
      * <p>
@@ -132,6 +146,18 @@ public interface Authenticator {
      * @param request The object representing the client request.
      * @param response The object representing the response to the client.
      * @throws IllegalStateException If the response has already been committed.
+     * @since 1.1.0
      */
     void logout(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response);
+
+    /**
+     * Logs out if the current request is authenticated.
+     *
+     * @param request The object representing the client request.
+     * @param response The object representing the response to the client.
+     * @throws IllegalStateException If the response has already been committed.
+     * @deprecated Use {@link #logout(HttpServletRequest, HttpServletResponse)} instead.
+     */
+    @Deprecated
+    void logout(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response);
 }
diff --git a/src/main/java/org/apache/sling/api/auth/NoAuthenticationHandlerException.java b/src/main/java/org/apache/sling/api/auth/NoAuthenticationHandlerException.java
index 6acd9f3..12727fc 100644
--- a/src/main/java/org/apache/sling/api/auth/NoAuthenticationHandlerException.java
+++ b/src/main/java/org/apache/sling/api/auth/NoAuthenticationHandlerException.java
@@ -23,11 +23,11 @@ import org.apache.sling.api.SlingException;
 /**
  * The <code>NoAuthenticationHandlerException</code> is thrown to indicate that
  * the
- * {@link Authenticator#login(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
+ * {@link Authenticator#login(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)}
  * method could not find a way to authenticate the request user.
  * <p>
  * This exception is thrown without a message. The caller of the
- * {@link Authenticator#login(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
+ * {@link Authenticator#login(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)}
  * method called is expected to immediately handle this exception and not to
  * forward it up the call chain.
  * <p>
diff --git a/src/main/java/org/apache/sling/api/auth/package-info.java b/src/main/java/org/apache/sling/api/auth/package-info.java
index 31227e5..eabf8d2 100644
--- a/src/main/java/org/apache/sling/api/auth/package-info.java
+++ b/src/main/java/org/apache/sling/api/auth/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("1.0.4")
+@Version("1.1.0")
 package org.apache.sling.api.auth;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/package-info.java b/src/main/java/org/apache/sling/api/package-info.java
index 415393f..7594503 100644
--- a/src/main/java/org/apache/sling/api/package-info.java
+++ b/src/main/java/org/apache/sling/api/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("2.3.5")
+@Version("2.4.0")
 package org.apache.sling.api;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/request/RequestUtil.java b/src/main/java/org/apache/sling/api/request/RequestUtil.java
index ecfde67..f1f6fdf 100644
--- a/src/main/java/org/apache/sling/api/request/RequestUtil.java
+++ b/src/main/java/org/apache/sling/api/request/RequestUtil.java
@@ -23,12 +23,13 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.jetbrains.annotations.Nullable;
-import org.jetbrains.annotations.NotNull;
-import javax.servlet.Servlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.api.SlingHttpServletRequest;
+import jakarta.servlet.Servlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
+import org.jetbrains.annotations.NotNull;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.apache.sling.api.servlets.HttpConstants;
 
 /**
@@ -103,7 +104,7 @@ public class RequestUtil {
         for (int i = 0; i < tokens.length; i++) {
             String[] parameters = tokens[i].split(";");
             String name = parameters[0];
-            Double qVal = new Double(1.0);
+            Double qVal = 1.0;
             if (parameters.length > 1) {
                 for (int j = 1; j < parameters.length; j++) {
                     String[] content = parameters[j].split("=", 2);
@@ -136,6 +137,7 @@ public class RequestUtil {
      *
      * @param servlet The servlet
      * @return The name of the servlet.
+     * @since 2.8.0
      */
     public static @NotNull String getServletName(@NotNull Servlet servlet) {
         String name = null;
@@ -153,6 +155,38 @@ public class RequestUtil {
         return name;
     }
 
+    /**
+     * Utility method to return a name for the given servlet. This method
+     * applies the following algorithm to find a non-<code>null</code>,
+     * non-empty name:
+     * <ol>
+     * <li>If the servlet has a servlet config, the servlet name from the
+     * servlet config is taken.
+     * <li>Otherwise check the servlet info
+     * <li>Otherwise use the fully qualified name of the servlet class
+     * </ol>
+     *
+     * @param servlet The servlet
+     * @return The name of the servlet.
+     * @deprecated Use {@link #getServletName(Servlet)}
+     */
+    @Deprecated
+    public static @NotNull String getServletName(@NotNull javax.servlet.Servlet servlet) {
+        String name = null;
+
+        if (servlet.getServletConfig() != null) {
+            name = servlet.getServletConfig().getServletName();
+        }
+        if (name == null || name.length() == 0) {
+            name = servlet.getServletInfo();
+        }
+        if (name == null || name.length() == 0) {
+            name = servlet.getClass().getName();
+        }
+
+        return name;
+    }
+
     /**
      * Sets the named request attribute to the new value and returns the
      * previous value.
@@ -163,6 +197,7 @@ public class RequestUtil {
      *            the attribte is actually removed from the request.
      * @return The previous value of the named request attribute or
      *         <code>null</code> if it was not set.
+     * @since 2.8.0
      */
     public static @Nullable Object setRequestAttribute(@NotNull HttpServletRequest request,
             @NotNull String name, Object value) {
@@ -175,6 +210,30 @@ public class RequestUtil {
         return oldValue;
     }
 
+    /**
+     * Sets the named request attribute to the new value and returns the
+     * previous value.
+     *
+     * @param request The request object whose attribute is to be set.
+     * @param name The name of the attribute to be set.
+     * @param value The new value of the attribute. If this is <code>null</code>
+     *            the attribte is actually removed from the request.
+     * @return The previous value of the named request attribute or
+     *         <code>null</code> if it was not set.
+     * @deprecated Use {@link #setRequestAttribute(HttpServletRequest, String, Object)}
+     */
+    @Deprecated
+    public static @Nullable Object setRequestAttribute(@NotNull javax.servlet.http.HttpServletRequest request,
+            @NotNull String name, Object value) {
+        Object oldValue = request.getAttribute(name);
+        if (value == null) {
+            request.removeAttribute(name);
+        } else {
+            request.setAttribute(name, value);
+        }
+        return oldValue;
+    }
+
     /**
      * Checks if the request contains a if-last-modified-since header and if the the
 	 * request's underlying resource has a jcr:lastModified property. if the properties were modified
@@ -182,8 +241,9 @@ public class RequestUtil {
      * @param req the request
      * @param resp the response
      * @return <code>true</code> if the response was set
+     * @since 2.8.0
      */
-    public static boolean handleIfModifiedSince(@NotNull SlingHttpServletRequest req, @NotNull HttpServletResponse resp){
+    public static boolean handleIfModifiedSince(@NotNull SlingJakartaHttpServletRequest req, @NotNull HttpServletResponse resp){
         boolean responseSet=false;
         long lastModified=req.getResource().getResourceMetadata().getModificationTime();
         if (lastModified!=-1){
@@ -198,4 +258,28 @@ public class RequestUtil {
         return responseSet;
     }
 
+    /**
+     * Checks if the request contains a if-last-modified-since header and if the the
+	 * request's underlying resource has a jcr:lastModified property. if the properties were modified
+     * before the header a 304 is sent otherwise the response last modified header is set.
+     * @param req the request
+     * @param resp the response
+     * @return <code>true</code> if the response was set
+     * @deprecated Use {@link #handleIfModifiedSince(SlingJakartaHttpServletRequest, HttpServletResponse)} instead.
+     */
+    @Deprecated
+    public static boolean handleIfModifiedSince(@NotNull org.apache.sling.api.SlingHttpServletRequest req, @NotNull javax.servlet.http.HttpServletResponse resp){
+        boolean responseSet=false;
+        long lastModified=req.getResource().getResourceMetadata().getModificationTime();
+        if (lastModified!=-1){
+            long modifiedTime = lastModified/1000; //seconds
+            long ims = req.getDateHeader(HttpConstants.HEADER_IF_MODIFIED_SINCE)/1000; //seconds
+            if (modifiedTime <= ims) {
+                resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+                responseSet=true;
+            }
+            resp.setDateHeader(HttpConstants.HEADER_LAST_MODIFIED, lastModified);
+        }
+        return responseSet;
+    }
 }
diff --git a/src/main/java/org/apache/sling/api/request/SlingRequestEvent.java b/src/main/java/org/apache/sling/api/request/SlingJakartaRequestEvent.java
similarity index 83%
copy from src/main/java/org/apache/sling/api/request/SlingRequestEvent.java
copy to src/main/java/org/apache/sling/api/request/SlingJakartaRequestEvent.java
index abefaec..ef2fd5c 100644
--- a/src/main/java/org/apache/sling/api/request/SlingRequestEvent.java
+++ b/src/main/java/org/apache/sling/api/request/SlingJakartaRequestEvent.java
@@ -19,8 +19,8 @@
 
 package org.apache.sling.api.request;
 
-import javax.servlet.ServletContext;
-import javax.servlet.ServletRequest;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletRequest;
 
 /**
  * represents an event published by the Sling engine while
@@ -28,10 +28,10 @@ import javax.servlet.ServletRequest;
  * <p>
  * This class is not intended to be extended or instantiated by clients.
  *
- * @see org.apache.sling.api.request.SlingRequestListener
- * @since 2.1.0 (Sling API Bundle 2.1.0)
+ * @since 2.8.0
+ * @see org.apache.sling.api.request.SlingJakartaRequestListener
 */
-public class SlingRequestEvent {
+public class SlingJakartaRequestEvent {
 
 	private final ServletContext sc;
 	private final ServletRequest request;
@@ -42,7 +42,7 @@ public class SlingRequestEvent {
 	 */
 	public enum EventType { EVENT_INIT, EVENT_DESTROY };
 
-	public SlingRequestEvent (ServletContext sc, ServletRequest request, EventType type ) {
+	public SlingJakartaRequestEvent (ServletContext sc, ServletRequest request, EventType type ) {
 		this.sc = sc;
 		this.request = request;
 		this.type = type;
diff --git a/src/main/java/org/apache/sling/api/request/SlingRequestListener.java b/src/main/java/org/apache/sling/api/request/SlingJakartaRequestListener.java
similarity index 79%
copy from src/main/java/org/apache/sling/api/request/SlingRequestListener.java
copy to src/main/java/org/apache/sling/api/request/SlingJakartaRequestListener.java
index 69d9f3d..4bc6cd3 100644
--- a/src/main/java/org/apache/sling/api/request/SlingRequestListener.java
+++ b/src/main/java/org/apache/sling/api/request/SlingJakartaRequestListener.java
@@ -26,12 +26,13 @@ import org.osgi.annotation.versioning.ConsumerType;
  * changes to Sling request of the Sling application they are part of.
  * To receive notification events, the implementation class must be
  * registered as an OSGi service with the service name
- * org.apache.sling.api.request.SlingRequestListener.
+ * org.apache.sling.api.request.event.SlingRequestListener.
+ * @since 2.8.0
  */
 @ConsumerType
-public interface SlingRequestListener {
+public interface SlingJakartaRequestListener {
 
-	String SERVICE_NAME = "org.apache.sling.api.request.SlingRequestListener";
+	String SERVICE_NAME = "org.apache.sling.api.request.event.SlingRequestListener";
 
 	/**
 	 * This method is called from the Sling application for every
@@ -40,7 +41,7 @@ public interface SlingRequestListener {
 	 *
 	 * @param sre the object representing the event
 	 *
-	 * @see org.apache.sling.api.request.SlingRequestEvent.EventType
+	 * @see org.apache.sling.api.request.SlingJakartaRequestEvent.EventType
 	 */
-	void onEvent( SlingRequestEvent sre );
+	void onEvent( SlingJakartaRequestEvent sre );
 }
diff --git a/src/main/java/org/apache/sling/api/request/SlingRequestEvent.java b/src/main/java/org/apache/sling/api/request/SlingRequestEvent.java
index abefaec..0915f1b 100644
--- a/src/main/java/org/apache/sling/api/request/SlingRequestEvent.java
+++ b/src/main/java/org/apache/sling/api/request/SlingRequestEvent.java
@@ -30,7 +30,9 @@ import javax.servlet.ServletRequest;
  *
  * @see org.apache.sling.api.request.SlingRequestListener
  * @since 2.1.0 (Sling API Bundle 2.1.0)
+ * @deprecated Use {@link org.apache.sling.api.request.SlingJakartaRequestEvent} instead.
 */
+@Deprecated
 public class SlingRequestEvent {
 
 	private final ServletContext sc;
diff --git a/src/main/java/org/apache/sling/api/request/SlingRequestListener.java b/src/main/java/org/apache/sling/api/request/SlingRequestListener.java
index 69d9f3d..18ce06f 100644
--- a/src/main/java/org/apache/sling/api/request/SlingRequestListener.java
+++ b/src/main/java/org/apache/sling/api/request/SlingRequestListener.java
@@ -27,8 +27,10 @@ import org.osgi.annotation.versioning.ConsumerType;
  * To receive notification events, the implementation class must be
  * registered as an OSGi service with the service name
  * org.apache.sling.api.request.SlingRequestListener.
+ * @deprecated Use {@link org.apache.sling.api.request.SlingJakartaRequestListener} instead.
  */
 @ConsumerType
+@Deprecated
 public interface SlingRequestListener {
 
 	String SERVICE_NAME = "org.apache.sling.api.request.SlingRequestListener";
diff --git a/src/main/java/org/apache/sling/api/request/builder/Builders.java b/src/main/java/org/apache/sling/api/request/builder/Builders.java
index a58b6fa..18e0c81 100644
--- a/src/main/java/org/apache/sling/api/request/builder/Builders.java
+++ b/src/main/java/org/apache/sling/api/request/builder/Builders.java
@@ -24,8 +24,8 @@ import org.apache.sling.api.request.RequestParameter;
 import org.apache.sling.api.request.RequestProgressTracker;
 import org.apache.sling.api.request.builder.impl.RequestParameterImpl;
 import org.apache.sling.api.request.builder.impl.RequestProgressTrackerImpl;
-import org.apache.sling.api.request.builder.impl.SlingHttpServletRequestImpl;
-import org.apache.sling.api.request.builder.impl.SlingHttpServletResponseImpl;
+import org.apache.sling.api.request.builder.impl.SlingHttpServletRequestBuilderImpl;
+import org.apache.sling.api.request.builder.impl.SlingHttpServletResponseBuilderImpl;
 import org.apache.sling.api.resource.Resource;
 import org.jetbrains.annotations.NotNull;
 
@@ -46,7 +46,7 @@ public final class Builders {
      * @throws IllegalArgumentException If resource is {@code null}
      */
     public static @NotNull SlingHttpServletRequestBuilder newRequestBuilder(@NotNull final Resource resource) {
-        return new SlingHttpServletRequestImpl(resource);
+        return new SlingHttpServletRequestBuilderImpl(resource);
     }
 
     /**
@@ -55,7 +55,7 @@ public final class Builders {
      * @return a response builder
      */
     public static @NotNull SlingHttpServletResponseBuilder newResponseBuilder() {
-        return new SlingHttpServletResponseImpl();
+        return new SlingHttpServletResponseBuilderImpl();
     }
 
     /**
diff --git a/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletRequestBuilder.java b/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletRequestBuilder.java
index 0c3675a..adbfb91 100644
--- a/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletRequestBuilder.java
+++ b/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletRequestBuilder.java
@@ -20,15 +20,15 @@ package org.apache.sling.api.request.builder;
 
 import java.util.Map;
 
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.apache.sling.api.request.RequestProgressTracker;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.osgi.annotation.versioning.ProviderType;
 
-/** 
+import jakarta.servlet.http.HttpServletRequest;
+
+/**
  * <p>Fluent helper for building a request.</p>
  * <p><strong>Note:</strong> instances of this interface are not thread-safe.</p>
  * @since 1.0 (Sling API Bundle 2.24.0)
@@ -36,7 +36,7 @@ import org.osgi.annotation.versioning.ProviderType;
 @ProviderType
 public interface SlingHttpServletRequestBuilder {
 
-    /** 
+    /**
      * Sets the HTTP request method to use - defaults to {@code GET}.
      * @param method the HTTP method
      * @return this object
@@ -44,14 +44,14 @@ public interface SlingHttpServletRequestBuilder {
      */
     @NotNull SlingHttpServletRequestBuilder withRequestMethod(@NotNull String method);
 
-    /** 
+    /**
      * Sets the HTTP request's {@code Content-Type} header.
      * @param contentType the {@code Content-Type} value
      * @return this object
      */
     @NotNull SlingHttpServletRequestBuilder withContentType(@Nullable String contentType);
 
-    /** 
+    /**
      * Uses the supplied content as the request's body content.
      * @param content the request body content
      * @return this object
@@ -65,7 +65,7 @@ public interface SlingHttpServletRequestBuilder {
      */
     @NotNull SlingHttpServletRequestBuilder withSelectors(@Nullable String ... selectors);
 
-    /** 
+    /**
      * Sets the optional extension of the internal request, which influences the servlet/script resolution.
      * @param extension the extension
      * @return this object
@@ -79,7 +79,7 @@ public interface SlingHttpServletRequestBuilder {
      */
     @NotNull SlingHttpServletRequestBuilder withSuffix(@Nullable String suffix);
 
-    /** 
+    /**
      * Sets a request parameter.
      * @param key the name of the parameter
      * @param value the value of the parameter
@@ -88,7 +88,7 @@ public interface SlingHttpServletRequestBuilder {
      */
     @NotNull SlingHttpServletRequestBuilder withParameter(@NotNull String key, @NotNull String value);
 
-    /** 
+    /**
      * Sets a request parameter.
      * @param key the name of the parameter
      * @param values the values of the parameter
@@ -97,22 +97,62 @@ public interface SlingHttpServletRequestBuilder {
      */
     @NotNull SlingHttpServletRequestBuilder withParameter(@NotNull String key, @NotNull String[] values);
 
-    /** 
+    /**
      * Adds the supplied request parameters to the current ones.
      * @param parameters additional parameters
      * @return this object
      */
     @NotNull SlingHttpServletRequestBuilder withParameters(@Nullable Map<String, String[]> parameters);
 
-    /** 
+    /**
+     * Uses the request dispatcher from the provided request.
+     * @param request the request from which to use the dispatcher
+     * @return this object
+     * @throws IllegalArgumentException if {@code request} is {@code null}
+     * @deprecated Use {@link #useRequestDispatcherFrom(SlingJakartaHttpServletRequest)} instead
+     */
+    @Deprecated
+    @NotNull SlingHttpServletRequestBuilder useRequestDispatcherFrom(@NotNull org.apache.sling.api.SlingHttpServletRequest request);
+
+    /**
      * Uses the request dispatcher from the provided request.
      * @param request the request from which to use the dispatcher
      * @return this object
      * @throws IllegalArgumentException if {@code request} is {@code null}
      */
-    @NotNull SlingHttpServletRequestBuilder useRequestDispatcherFrom(@NotNull SlingHttpServletRequest request);
+    @NotNull SlingHttpServletRequestBuilder useRequestDispatcherFrom(@NotNull org.apache.sling.api.SlingJakartaHttpServletRequest request);
 
-    /** 
+    /**
+     * Uses the session from the provided request.
+     * @param request the request from which to use the session
+     * @return this object
+     * @throws IllegalArgumentException if {@code request} is {@code null}
+     * @deprecated Use {@link #useSessionFrom(HttpServletRequest)} instead
+     */
+    @Deprecated
+    @NotNull SlingHttpServletRequestBuilder useSessionFrom(@NotNull javax.servlet.http.HttpServletRequest request);
+
+    /**
+     * Uses the attributes backed by the provided request.
+     * @param request the request from which to use the attributes
+     * @return this object
+     * @throws IllegalArgumentException if {@code request} is {@code null}
+     * @deprecated Use {@link #useAttributesFrom(HttpServletRequest)} instead
+     */
+    @Deprecated
+    @NotNull SlingHttpServletRequestBuilder useAttributesFrom(@NotNull javax.servlet.http.HttpServletRequest request);
+
+    /**
+     * Uses the servlet context from the provided request.
+     * @param request the request from which to use the servlet context
+     * @return this object
+     * @throws IllegalArgumentException if {@code request} is {@code null}
+     * @deprecated Use {@link #useServletContextFrom(HttpServletRequest)} instead
+     */
+    @Deprecated
+    @NotNull SlingHttpServletRequestBuilder useServletContextFrom(@NotNull javax.servlet.http.HttpServletRequest request);
+
+    /**
      * Uses the session from the provided request.
      * @param request the request from which to use the session
      * @return this object
@@ -120,7 +160,7 @@ public interface SlingHttpServletRequestBuilder {
      */
     @NotNull SlingHttpServletRequestBuilder useSessionFrom(@NotNull HttpServletRequest request);
 
-    /** 
+    /**
      * Uses the attributes backed by the provided request.
      * @param request the request from which to use the attributes
      * @return this object
@@ -128,7 +168,7 @@ public interface SlingHttpServletRequestBuilder {
      */
     @NotNull SlingHttpServletRequestBuilder useAttributesFrom(@NotNull HttpServletRequest request);
 
-    /** 
+    /**
      * Uses the servlet context from the provided request.
      * @param request the request from which to use the servlet context
      * @return this object
@@ -148,6 +188,16 @@ public interface SlingHttpServletRequestBuilder {
      * Builds the request. Once this method has been called, the builder must not be used anymore. In order to create a new request a new
      * builder has to be used.
      * @return a request object
+     * @since 1.4
+     */
+    @NotNull SlingJakartaHttpServletRequest buildJakartaRequest();
+
+    /**
+     * Builds the request. Once this method has been called, the builder must not be used anymore. In order to create a new request a new
+     * builder has to be used.
+     * @return a request object
+     * @deprecated Use {@link #buildJakartaRequest()} instead
      */
-    @NotNull SlingHttpServletRequest build();
+    @Deprecated
+    @NotNull org.apache.sling.api.SlingHttpServletRequest build();
 }
diff --git a/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseBuilder.java b/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseBuilder.java
index cb69b81..9c7972f 100644
--- a/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseBuilder.java
+++ b/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseBuilder.java
@@ -34,6 +34,17 @@ public interface SlingHttpServletResponseBuilder {
      * builder has to be used.
      *
      * @return a response object
+     * @deprecated Use {@link #buildJakartaResponseResult()} instead
      */
+    @Deprecated
     @NotNull SlingHttpServletResponseResult build();
+
+    /**
+     * Builds the response. Once this method has been called, the builder must not be used anymore. In order to create a new response a new
+     * builder has to be used.
+     *
+     * @return a response object
+     * @since 1.4
+     */
+    @NotNull SlingJakartaHttpServletResponseResult buildJakartaResponseResult();
 }
diff --git a/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseResult.java b/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseResult.java
index c9e3039..4b40f32 100644
--- a/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseResult.java
+++ b/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseResult.java
@@ -30,8 +30,10 @@ import org.osgi.annotation.versioning.ProviderType;
  *
  * <p><strong>Note:</strong> instances of this interface are not thread-safe.</p>
  * @since 1.0 (Sling API Bundle 2.24.0)
+ * @deprecated Use {@link SlingJakartaHttpServletResponseResult} instead
  */
 @ProviderType
+@Deprecated
 public interface SlingHttpServletResponseResult extends SlingHttpServletResponse {
 
     /**
diff --git a/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseResult.java b/src/main/java/org/apache/sling/api/request/builder/SlingJakartaHttpServletResponseResult.java
similarity index 86%
copy from src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseResult.java
copy to src/main/java/org/apache/sling/api/request/builder/SlingJakartaHttpServletResponseResult.java
index c9e3039..c896eb1 100644
--- a/src/main/java/org/apache/sling/api/request/builder/SlingHttpServletResponseResult.java
+++ b/src/main/java/org/apache/sling/api/request/builder/SlingJakartaHttpServletResponseResult.java
@@ -18,21 +18,21 @@
  */
 package org.apache.sling.api.request.builder;
 
-import javax.servlet.http.Cookie;
+import jakarta.servlet.http.Cookie;
 
-import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.osgi.annotation.versioning.ProviderType;
 
 /**
- * <p>This is an extension of a {@link SlingHttpServletResponse} to get the result from a processing operation.</p>
+ * <p>This is an extension of a {@link SlingJakartaHttpServletResponse} to get the result from a processing operation.</p>
  *
  * <p><strong>Note:</strong> instances of this interface are not thread-safe.</p>
- * @since 1.0 (Sling API Bundle 2.24.0)
+ * @since 1.4
  */
 @ProviderType
-public interface SlingHttpServletResponseResult extends SlingHttpServletResponse {
+public interface SlingJakartaHttpServletResponseResult extends SlingJakartaHttpServletResponse {
 
     /**
      * Gets the content length
diff --git a/src/main/java/org/apache/sling/api/request/builder/impl/HttpSessionImpl.java b/src/main/java/org/apache/sling/api/request/builder/impl/HttpSessionImpl.java
index 19db6a2..7bdf607 100644
--- a/src/main/java/org/apache/sling/api/request/builder/impl/HttpSessionImpl.java
+++ b/src/main/java/org/apache/sling/api/request/builder/impl/HttpSessionImpl.java
@@ -24,8 +24,8 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpSession;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.http.HttpSession;
 
 /**
  * Internal {@link HttpSession} implementation.
@@ -38,7 +38,7 @@ public class HttpSessionImpl implements HttpSession {
     private final long creationTime = System.currentTimeMillis();
     private boolean invalidated = false;
     private int maxActiveInterval = 1800;
-    
+
     public HttpSessionImpl(final ServletContext context) {
         this.servletContext = context;
     }
@@ -47,7 +47,7 @@ public class HttpSessionImpl implements HttpSession {
     public ServletContext getServletContext() {
         return this.servletContext;
     }
-    
+
     @Override
     public Object getAttribute(final String name) {
         checkInvalidatedState();
@@ -71,36 +71,12 @@ public class HttpSessionImpl implements HttpSession {
         return this.creationTime;
     }
 
-    @Override
-    public Object getValue(final String name) {
-        checkInvalidatedState();
-        return getAttribute(name);
-    }
-
-    @Override
-    public String[] getValueNames() {
-        checkInvalidatedState();
-        return this.attributeMap.keySet().toArray(new String[this.attributeMap.keySet().size()]);
-    }
-
-    @Override
-    public void putValue(final String name, final Object value) {
-        checkInvalidatedState();
-        setAttribute(name, value);
-    }
-
     @Override
     public void removeAttribute(final String name) {
         checkInvalidatedState();
         this.attributeMap.remove(name);
     }
 
-    @Override
-    public void removeValue(final String name) {
-        checkInvalidatedState();
-        this.attributeMap.remove(name);
-    }
-
     @Override
     public void setAttribute(final String name, final Object value) {
         checkInvalidatedState();
@@ -112,13 +88,13 @@ public class HttpSessionImpl implements HttpSession {
         checkInvalidatedState();
         this.invalidated = true;
     }
-    
+
     private void checkInvalidatedState() {
         if (invalidated) {
             throw new IllegalStateException("Session is already invalidated.");
         }
     }
-    
+
     public boolean isInvalidated() {
         return invalidated;
     }
@@ -128,7 +104,7 @@ public class HttpSessionImpl implements HttpSession {
         checkInvalidatedState();
         return true;
     }
-    
+
     @Override
     public long getLastAccessedTime() {
         checkInvalidatedState();
@@ -144,11 +120,4 @@ public class HttpSessionImpl implements HttpSession {
     public void setMaxInactiveInterval(final int interval) {
         this.maxActiveInterval = interval;
     }
-
-    // --- unsupported operations ---
-    @Override
-    @SuppressWarnings("deprecation")
-    public javax.servlet.http.HttpSessionContext getSessionContext() {
-        throw new UnsupportedOperationException();
-    }
 }
diff --git a/src/main/java/org/apache/sling/api/request/builder/impl/ServletContextImpl.java b/src/main/java/org/apache/sling/api/request/builder/impl/ServletContextImpl.java
index 7c4731b..e518fb2 100644
--- a/src/main/java/org/apache/sling/api/request/builder/impl/ServletContextImpl.java
+++ b/src/main/java/org/apache/sling/api/request/builder/impl/ServletContextImpl.java
@@ -25,17 +25,16 @@ import java.util.EventListener;
 import java.util.Map;
 import java.util.Set;
 
-import javax.servlet.Filter;
-import javax.servlet.FilterRegistration;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRegistration;
-import javax.servlet.ServletRegistration.Dynamic;
-import javax.servlet.SessionCookieConfig;
-import javax.servlet.SessionTrackingMode;
-import javax.servlet.descriptor.JspConfigDescriptor;
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterRegistration;
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.Servlet;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRegistration;
+import jakarta.servlet.SessionCookieConfig;
+import jakarta.servlet.SessionTrackingMode;
+import jakarta.servlet.descriptor.JspConfigDescriptor;
 
 /**
  * Internal {@link ServletContext} implementation.
@@ -123,36 +122,16 @@ public class ServletContextImpl implements ServletContext {
         throw new UnsupportedOperationException();
     }
 
-    @Override
-    public Servlet getServlet(final String name) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public String getServletContextName() {
         throw new UnsupportedOperationException();
     }
 
-    @Override
-    public Enumeration<String> getServletNames() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public Enumeration<Servlet> getServlets() {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public void log(final String msg) {
         throw new UnsupportedOperationException();
     }
 
-    @Override
-    public void log(final Exception exception, final String msg) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public void log(final String msg, final Throwable throwable) {
         throw new UnsupportedOperationException();
@@ -184,17 +163,17 @@ public class ServletContextImpl implements ServletContext {
     }
 
     @Override
-    public Dynamic addServlet(final String servletName, final String className) {
+    public ServletRegistration.Dynamic addServlet(final String servletName, final String className) {
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public Dynamic addServlet(final String servletName, final Servlet servlet) {
+    public ServletRegistration.Dynamic addServlet(final String servletName, final Servlet servlet) {
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public Dynamic addServlet(final String servletName, final Class<? extends Servlet> servletClass) {
+    public ServletRegistration.Dynamic addServlet(final String servletName, final Class<? extends Servlet> servletClass) {
         throw new UnsupportedOperationException();
     }
 
@@ -303,4 +282,39 @@ public class ServletContextImpl implements ServletContext {
         throw new UnsupportedOperationException();
     }
 
+    @Override
+    public ServletRegistration.Dynamic addJspFile(String servletName, String jspFile) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getRequestCharacterEncoding() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getResponseCharacterEncoding() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int getSessionTimeout() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void setRequestCharacterEncoding(String encoding) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void setResponseCharacterEncoding(String encoding) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void setSessionTimeout(int sessionTimeout) {
+        throw new UnsupportedOperationException();
+    }
+
 }
diff --git a/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestBuilderImpl.java b/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestBuilderImpl.java
new file mode 100644
index 0000000..6391f15
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestBuilderImpl.java
@@ -0,0 +1,479 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.request.builder.impl;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.apache.felix.http.jakartawrappers.HttpServletRequestWrapper;
+import org.apache.felix.http.jakartawrappers.RequestDispatcherWrapper;
+import org.apache.felix.http.jakartawrappers.ServletContextWrapper;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.request.RequestDispatcherOptions;
+import org.apache.sling.api.request.RequestParameterMap;
+import org.apache.sling.api.request.RequestPathInfo;
+import org.apache.sling.api.request.RequestProgressTracker;
+import org.apache.sling.api.request.builder.Builders;
+import org.apache.sling.api.request.builder.SlingHttpServletRequestBuilder;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.uri.SlingUriBuilder;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpSession;
+
+/**
+ * Internal {@link SlingHttpServletRequestBuilder} implementation
+ */
+public class SlingHttpServletRequestBuilderImpl implements SlingHttpServletRequestBuilder {
+
+    /** Default http method */
+    private static final String DEFAULT_METHOD = "GET";
+
+    /** Protocol */
+    static final String SECURE_PROTOCOL = "https";
+    static final String HTTP_PROTOCOL = "http";
+
+    static final String CHARSET_SEPARATOR = ";charset=";
+
+    static final ResourceBundle EMPTY_RESOURCE_BUNDLE = new ListResourceBundle() {
+        @Override
+        protected Object[][] getContents() {
+            return new Object[0][0];
+        }
+    };
+    private static final String REQUEST = "request";
+
+    /** Required resource */
+    final Resource resource;
+
+    /** Optional selectors */
+    private String[] selectors;
+
+    /** Optional extension */
+    private String extension;
+
+    /** Optional suffix */
+    private String suffix;
+
+    /** HTTP method */
+    String requestMethod = DEFAULT_METHOD;
+
+    /** Optional content type / character encoding */
+    String contentType;
+    String characterEncoding;
+
+    /** Optional body */
+    String body;
+
+    /** Is the builder locked? */
+    private boolean locked = false;
+
+    /** Parameters map */
+    final Map<String, String[]> parameters = new LinkedHashMap<>();
+
+    /** Request path info */
+    RequestPathInfo requestPathInfo;
+
+    /** Optional query string */
+    String queryString;
+
+    /** The path info, calculated based on the provided resource */
+    String pathInfo;
+
+    /** Attributes */
+    final Map<String, Object> attributeMap = new HashMap<>();
+
+    /** On demand session */
+    HttpSession session;
+
+    /** On demand request parameter map */
+    RequestParameterMap requestParameterMap;
+
+    /** Headers */
+    final HeaderSupport headerSupport = new HeaderSupport();
+
+    /** Cookies */
+    final Map<String, Cookie> cookies = new LinkedHashMap<>();
+
+    /** Request progress tracker */
+    RequestProgressTracker progressTracker;
+
+    HttpServletRequest sessionProvider;
+
+    HttpServletRequest attributesProvider;
+
+    ServletContext servletContext;
+
+    SlingJakartaHttpServletRequest requestDispatcherProvider;
+
+    boolean getInputStreamCalled;
+    boolean getReaderCalled;
+
+    // the following fields are not settable atm
+    final Locale locale = Locale.US;
+    final String contextPath = "";
+    final String scheme = HTTP_PROTOCOL;
+    final String serverName = "localhost";
+    final int serverPort = 80;
+    String authType;
+    String remoteUser;
+    String remoteAddr;
+    String remoteHost;
+    int remotePort;
+    String servletPath = "";
+    String responseContentType;
+
+    /**
+     * Create a new request builder with the minimal information
+     * @param resource The resource
+     */
+    public SlingHttpServletRequestBuilderImpl(final @NotNull Resource resource) {
+        checkNotNull("resource", resource);
+        this.resource = resource;
+    }
+
+    private void checkLocked() {
+        if ( locked ) {
+            throw new IllegalStateException("The builder can't be reused. Create a new builder instead.");
+        }
+    }
+
+    private void checkNotNull(final String info, final Object candidate) {
+        if (candidate == null) {
+            throw new IllegalArgumentException(info.concat(" is null"));
+        }
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withRequestMethod(@NotNull  String method) {
+        this.checkLocked();
+        this.checkNotNull("method", method);
+        this.requestMethod = method.toUpperCase();
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withContentType(final @Nullable String type) {
+        this.checkLocked();
+        final int pos = type == null ? -1 : type.indexOf(SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR);
+        if (pos != -1) {
+            this.contentType = type.substring(0, pos);
+            this.characterEncoding = type.substring(pos + SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR.length());
+        } else {
+            this.contentType = type;
+        }
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withBody(final @Nullable String content) {
+        this.checkLocked();
+        this.body = content;
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withSelectors(final String ... selectors) {
+        this.checkLocked();
+        this.selectors = selectors;
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withExtension(final String extension) {
+        this.checkLocked();
+        this.extension = extension;
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withSuffix(String suffix) {
+        this.checkLocked();
+        this.suffix = suffix;
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withParameter(final @NotNull String key, final @NotNull String value) {
+        this.checkLocked();
+        this.checkNotNull("key", key);
+        this.checkNotNull("value", value);
+        this.parameters.put(key, new String[] {value});
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withParameter(final @NotNull String key, final @NotNull String[] values) {
+        this.checkLocked();
+        this.checkNotNull("key", key);
+        this.checkNotNull("values", values);
+        this.parameters.put(key, values);
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withParameters(final @Nullable Map<String, String[]> parameters) {
+        this.checkLocked();
+        if (parameters != null) {
+            this.parameters.putAll(parameters);
+        }
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder useAttributesFrom(@NotNull javax.servlet.http.HttpServletRequest request) {
+        this.checkLocked();
+        this.checkNotNull(REQUEST, request);
+        this.attributesProvider = new HttpServletRequestWrapper(request);
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder useServletContextFrom(@NotNull javax.servlet.http.HttpServletRequest request) {
+        this.checkLocked();
+        this.checkNotNull(REQUEST, request);
+        this.servletContext = new ServletContextWrapper(request.getServletContext());
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder useSessionFrom(@NotNull javax.servlet.http.HttpServletRequest request) {
+        this.checkLocked();
+        this.checkNotNull(REQUEST, request);
+        this.sessionProvider = new HttpServletRequestWrapper(request);
+        return this;
+    }
+
+    @Override
+    @Deprecated
+    public @NotNull SlingHttpServletRequestBuilder useRequestDispatcherFrom(@NotNull org.apache.sling.api.SlingHttpServletRequest request) {
+        this.checkLocked();
+        this.checkNotNull(REQUEST, request);
+        this.requestDispatcherProvider = new SlingJakartaHttpServletRequestImpl(this) {
+
+            @Override
+            public RequestDispatcher getRequestDispatcher(final String path) {
+                final javax.servlet.RequestDispatcher dispatcher = request.getRequestDispatcher(path);
+                if (dispatcher != null) {
+                    return new RequestDispatcherWrapper(dispatcher);
+                }
+                return null;
+            }
+
+            @Override
+            public RequestDispatcher getRequestDispatcher(final String path, final RequestDispatcherOptions options) {
+                final javax.servlet.RequestDispatcher dispatcher = request.getRequestDispatcher(path, options);
+                if (dispatcher != null) {
+                    return new RequestDispatcherWrapper(dispatcher);
+                }
+                return null;
+            }
+
+            @Override
+            public RequestDispatcher getRequestDispatcher(final Resource resource) {
+                final javax.servlet.RequestDispatcher dispatcher = request.getRequestDispatcher(resource);
+                if (dispatcher != null) {
+                    return new RequestDispatcherWrapper(dispatcher);
+                }
+                return null;
+            }
+
+            @Override
+            public RequestDispatcher getRequestDispatcher(final Resource resource, final RequestDispatcherOptions options) {
+                final javax.servlet.RequestDispatcher dispatcher = request.getRequestDispatcher(resource, options);
+                if (dispatcher != null) {
+                    return new RequestDispatcherWrapper(dispatcher);
+                }
+                return null;
+            }
+
+        };
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder useAttributesFrom(@NotNull HttpServletRequest request) {
+        this.checkLocked();
+        this.checkNotNull(REQUEST, request);
+        this.attributesProvider = request;
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder useServletContextFrom(@NotNull HttpServletRequest request) {
+        this.checkLocked();
+        this.checkNotNull(REQUEST, request);
+        this.servletContext = request.getServletContext();
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder useSessionFrom(@NotNull HttpServletRequest request) {
+        this.checkLocked();
+        this.checkNotNull(REQUEST, request);
+        this.sessionProvider = request;
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder useRequestDispatcherFrom(@NotNull SlingJakartaHttpServletRequest request) {
+        this.checkLocked();
+        this.checkNotNull(REQUEST, request);
+        this.requestDispatcherProvider = request;
+        return this;
+    }
+
+    @Override
+    public @NotNull SlingHttpServletRequestBuilder withRequestProgressTracker(@NotNull RequestProgressTracker tracker) {
+        this.progressTracker = tracker;
+        return this;
+    }
+
+    @Override
+    @Deprecated
+    public @NotNull org.apache.sling.api.SlingHttpServletRequest build() {
+        this.checkLocked();
+        this.locked = true;
+
+        this.requestPathInfo = SlingUriBuilder.createFrom(this.resource)
+            .setExtension(this.extension)
+            .setSuffix(this.suffix)
+            .setSelectors(this.selectors)
+            .build();
+
+        this.queryString = this.formatQueryString();
+        this.pathInfo = this.buildPathInfo();
+
+        if ( this.servletContext == null ) {
+            this.servletContext = new ServletContextImpl();
+        }
+        if (this.body == null ) {
+            this.body = "";
+        }
+        final org.apache.sling.api.SlingHttpServletRequest req = new SlingHttpServletRequestImpl(this);
+        if (this.progressTracker == null) {
+            // if attributes are shared with a Sling request, then the progress tracker is available from there
+            final Object attrTracker = req.getAttribute(RequestProgressTracker.class.getName());
+            if ( attrTracker instanceof RequestProgressTracker) {
+                this.progressTracker = (RequestProgressTracker)attrTracker;
+            } else {
+                this.progressTracker = Builders.newRequestProgressTracker();
+            }
+        }
+        return req;
+    }
+
+    @Override
+    public @NotNull SlingJakartaHttpServletRequest buildJakartaRequest() {
+        this.checkLocked();
+        this.locked = true;
+
+        this.requestPathInfo = SlingUriBuilder.createFrom(this.resource)
+            .setExtension(this.extension)
+            .setSuffix(this.suffix)
+            .setSelectors(this.selectors)
+            .build();
+
+        this.queryString = this.formatQueryString();
+        this.pathInfo = this.buildPathInfo();
+
+        if ( this.servletContext == null ) {
+            this.servletContext = new ServletContextImpl();
+        }
+        if (this.body == null ) {
+            this.body = "";
+        }
+        final SlingJakartaHttpServletRequest req = new SlingJakartaHttpServletRequestImpl(this);
+        if (this.progressTracker == null) {
+            // if attributes are shared with a Sling request, then the progress tracker is available from there
+            final Object attrTracker = req.getAttribute(RequestProgressTracker.class.getName());
+            if ( attrTracker instanceof RequestProgressTracker) {
+                this.progressTracker = (RequestProgressTracker)attrTracker;
+            } else {
+                this.progressTracker = Builders.newRequestProgressTracker();
+            }
+        }
+        return req;
+    }
+
+    private String buildPathInfo() {
+        final StringBuilder builder = new StringBuilder();
+
+        builder.append(this.requestPathInfo.getResourcePath());
+        if ( this.requestPathInfo.getSelectorString() != null ) {
+            builder.append('.');
+            builder.append(this.requestPathInfo.getSelectorString());
+        }
+
+        if ( this.requestPathInfo.getExtension() != null ) {
+            builder.append('.');
+            builder.append(this.requestPathInfo.getExtension());
+        }
+
+        if ( this.requestPathInfo.getSuffix() != null ) {
+            builder.append(this.requestPathInfo.getSuffix());
+        }
+
+        return builder.toString();
+    }
+
+    private String formatQueryString() {
+        final StringBuilder builder = new StringBuilder();
+        for (Map.Entry<String, String[]> entry : this.parameters.entrySet()) {
+            if (entry.getValue() != null) {
+                formatQueryStringParameter(builder, entry);
+            }
+        }
+        return builder.length() > 0 ? builder.toString() : null;
+    }
+
+    private static String encode(final String v) {
+        try {
+            return URLEncoder.encode(v, StandardCharsets.UTF_8.name());
+        } catch (final UnsupportedEncodingException uee) {
+            // UTF-8 is always supported, we return the string as-is to make the compiler happy
+            return v;
+        }
+    }
+
+    private static void formatQueryStringParameter(final StringBuilder builder, final Map.Entry<String, String[]> entry) {
+        for (String value : entry.getValue()) {
+            if (builder.length() != 0) {
+                builder.append('&');
+            }
+            builder.append(encode(entry.getKey()));
+            builder.append('=');
+            if (value != null) {
+                builder.append(encode(value));
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImpl.java b/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImpl.java
index dcb1314..b76ff02 100644
--- a/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImpl.java
+++ b/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImpl.java
@@ -24,7 +24,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringReader;
 import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.security.Principal;
 import java.util.ArrayList;
@@ -32,10 +31,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.ListResourceBundle;
 import java.util.Locale;
 import java.util.Map;
 import java.util.ResourceBundle;
@@ -50,12 +46,15 @@ import javax.servlet.ServletInputStream;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpUpgradeHandler;
 import javax.servlet.http.Part;
 
+import org.apache.felix.http.javaxwrappers.RequestDispatcherWrapper;
+import org.apache.felix.http.javaxwrappers.ServletContextWrapper;
+import org.apache.felix.http.javaxwrappers.CookieWrapper;
+import org.apache.felix.http.javaxwrappers.HttpSessionWrapper;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.adapter.SlingAdaptable;
 import org.apache.sling.api.request.RequestDispatcherOptions;
@@ -63,342 +62,27 @@ import org.apache.sling.api.request.RequestParameter;
 import org.apache.sling.api.request.RequestParameterMap;
 import org.apache.sling.api.request.RequestPathInfo;
 import org.apache.sling.api.request.RequestProgressTracker;
-import org.apache.sling.api.request.builder.Builders;
-import org.apache.sling.api.request.builder.SlingHttpServletRequestBuilder;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.api.uri.SlingUriBuilder;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
 
 /**
  * Internal {@link SlingHttpServletRequest} implementation.
+ * @deprecated
  */
-public class SlingHttpServletRequestImpl extends SlingAdaptable 
-    implements SlingHttpServletRequest, SlingHttpServletRequestBuilder {
+@Deprecated
+public class SlingHttpServletRequestImpl extends SlingAdaptable implements SlingHttpServletRequest {
 
-    /** Default http method */
-    private static final String DEFAULT_METHOD = "GET";
+    private final SlingHttpServletRequestBuilderImpl builder;
 
-    /** Protocol */
-    private static final String SECURE_PROTOCOL = "https";
-    private static final String HTTP_PROTOCOL = "http";
-
-    static final String CHARSET_SEPARATOR = ";charset=";
-
-    private static final ResourceBundle EMPTY_RESOURCE_BUNDLE = new ListResourceBundle() {
-        @Override
-        protected Object[][] getContents() {
-            return new Object[0][0];
-        }
-    };
-    private static final String REQUEST = "request";
-
-    /** Required resource */
-    private final Resource resource;
-
-    /** Optional selectors */
-    private String[] selectors;
-
-    /** Optional extension */
-    private String extension;
-
-    /** Optional suffix */
-    private String suffix;
-
-    /** HTTP method */
-    private String requestMethod = DEFAULT_METHOD;
-    
-    /** Optional content type / character encoding */
-    private String contentType;
-    private String characterEncoding;
-
-    /** Optional body */
-    private String body;
-
-    /** Is the builder locked? */
-    private boolean locked = false;
-
-    /** Parameters map */
-    private final Map<String, String[]> parameters = new LinkedHashMap<>();
-
-    /** Request path info */
-    private RequestPathInfo requestPathInfo;
-    
-    /** Optional query string */
-    private String queryString;
-
-    /** The path info, calculated based on the provided resource */
-    private String pathInfo;
-
-    /** Attributes */
-    private final Map<String, Object> attributeMap = new HashMap<>();
-
-    /** On demand session */
-    private HttpSession session;
-
-    /** On demand request parameter map */
-    private RequestParameterMap requestParameterMap;
-
-    /** Headers */
-    private final HeaderSupport headerSupport = new HeaderSupport();
-    
-    /** Cookies */
-    private final Map<String, Cookie> cookies = new LinkedHashMap<>();
-
-    /** Request progress tracker */
-    private RequestProgressTracker progressTracker;
-
-    private HttpServletRequest sessionProvider;
-
-    private HttpServletRequest attributesProvider;
-
-    private ServletContext servletContext;
-
-    private SlingHttpServletRequest requestDispatcherProvider;
-
-    private boolean getInputStreamCalled;
-    private boolean getReaderCalled;
-
-    // the following fields are not settable atm
-    private final Locale locale = Locale.US;
-    private final String contextPath = "";
-    private final String scheme = HTTP_PROTOCOL;
-    private final String serverName = "localhost";
-    private final int serverPort = 80;
-    private String authType;
-    private String remoteUser;
-    private String remoteAddr;
-    private String remoteHost;
-    private int remotePort;
-    private String servletPath = "";
-    private String responseContentType;
-    
-    /** 
-     * Create a new request builder with the minimal information
-     * @param resource The resource
-     */
-    public SlingHttpServletRequestImpl(final @NotNull Resource resource) {
-        checkNotNull("resource", resource);
-        this.resource = resource;
-    }
-
-    private void checkLocked() {
-        if ( locked ) {
-            throw new IllegalStateException("The builder can't be reused. Create a new builder instead.");
-        }
-    }
-
-    private void checkNotNull(final String info, final Object candidate) {
-        if (candidate == null) {
-            throw new IllegalArgumentException(info.concat(" is null"));
-        }
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withRequestMethod(@NotNull  String method) {
-        this.checkLocked();
-        this.checkNotNull("method", method);
-        this.requestMethod = method.toUpperCase();
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withContentType(final @Nullable String type) {
-        this.checkLocked();
-        final int pos = type == null ? -1 : type.indexOf(SlingHttpServletRequestImpl.CHARSET_SEPARATOR);
-        if (pos != -1) {
-            this.contentType = type.substring(0, pos);
-            this.characterEncoding = type.substring(pos + SlingHttpServletRequestImpl.CHARSET_SEPARATOR.length());
-        } else {
-            this.contentType = type;
-        }
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withBody(final @Nullable String content) {
-        this.checkLocked();
-        this.body = content;
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withSelectors(final String ... selectors) {
-        this.checkLocked();
-        this.selectors = selectors;
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withExtension(final String extension) {
-        this.checkLocked();
-        this.extension = extension;
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withSuffix(String suffix) {
-        this.checkLocked();
-        this.suffix = suffix;
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withParameter(final @NotNull String key, final @NotNull String value) {
-        this.checkLocked();
-        this.checkNotNull("key", key);
-        this.checkNotNull("value", value);
-        this.parameters.put(key, new String[] {value});
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withParameter(final @NotNull String key, final @NotNull String[] values) {
-        this.checkLocked();
-        this.checkNotNull("key", key);
-        this.checkNotNull("values", values);
-        this.parameters.put(key, values);
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withParameters(final @Nullable Map<String, String[]> parameters) {
-        this.checkLocked();
-        if (parameters != null) {
-            this.parameters.putAll(parameters);
-        }
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder useAttributesFrom(@NotNull HttpServletRequest request) {
-        this.checkLocked();
-        this.checkNotNull(REQUEST, request);
-        this.attributesProvider = request;
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder useServletContextFrom(@NotNull HttpServletRequest request) {
-        this.checkLocked();
-        this.checkNotNull(REQUEST, request);
-        this.servletContext = request.getServletContext();
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder useSessionFrom(@NotNull HttpServletRequest request) {
-        this.checkLocked();
-        this.checkNotNull(REQUEST, request);
-        this.sessionProvider = request;
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder useRequestDispatcherFrom(@NotNull SlingHttpServletRequest request) {
-        this.checkLocked();
-        this.checkNotNull(REQUEST, request);
-        this.requestDispatcherProvider = request;
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequestBuilder withRequestProgressTracker(@NotNull RequestProgressTracker tracker) {
-        this.progressTracker = tracker;
-        return this;
-    }
-
-    @Override
-    public @NotNull SlingHttpServletRequest build() {
-        this.checkLocked();
-        this.locked = true;
-
-        this.requestPathInfo = SlingUriBuilder.createFrom(this.resource)
-            .setExtension(this.extension)
-            .setSuffix(this.suffix)
-            .setSelectors(this.selectors)
-            .build();
-        
-        this.queryString = this.formatQueryString();
-        this.pathInfo = this.buildPathInfo();
-
-        if ( this.servletContext == null ) {
-            this.servletContext = new ServletContextImpl();
-        }
-        if (this.body == null ) {
-            this.body = "";
-        }
-        if (this.progressTracker == null) {
-            // if attributes are shared with a Sling request, then the progress tracker is available from there
-            final Object attrTracker = this.getAttribute(RequestProgressTracker.class.getName());
-            if ( attrTracker instanceof RequestProgressTracker) {
-                this.progressTracker = (RequestProgressTracker)attrTracker;
-            } else {
-                this.progressTracker = Builders.newRequestProgressTracker();
-            }
-        }
-        return this;
-    }
-
-    private String buildPathInfo() {
-        final StringBuilder builder = new StringBuilder();
-
-        builder.append(this.requestPathInfo.getResourcePath());
-        if ( this.requestPathInfo.getSelectorString() != null ) {
-            builder.append('.');
-            builder.append(this.requestPathInfo.getSelectorString());
-        }
-
-        if ( this.requestPathInfo.getExtension() != null ) {
-            builder.append('.');
-            builder.append(this.requestPathInfo.getExtension());
-        }
-
-        if ( this.requestPathInfo.getSuffix() != null ) {
-            builder.append(this.requestPathInfo.getSuffix());
-        }
-
-        return builder.toString();
-    }
-
-    private String formatQueryString() {
-        final StringBuilder builder = new StringBuilder();
-        for (Map.Entry<String, String[]> entry : this.getParameterMap().entrySet()) {
-            if (entry.getValue() != null) {
-                formatQueryStringParameter(builder, entry);
-            }
-        }
-        return builder.length() > 0 ? builder.toString() : null;
-    }
-
-    private static String encode(final String v) {
-        try {
-            return URLEncoder.encode(v, StandardCharsets.UTF_8.name());
-        } catch (final UnsupportedEncodingException uee) {
-            // UTF-8 is always supported, we return the string as-is to make the compiler happy
-            return v;
-        }
-    }
-
-    private static void formatQueryStringParameter(final StringBuilder builder, final Map.Entry<String, String[]> entry) {
-        for (String value : entry.getValue()) {
-            if (builder.length() != 0) {
-                builder.append('&');
-            }
-            builder.append(encode(entry.getKey()));
-            builder.append('=');
-            if (value != null) {
-                builder.append(encode(value));
-            }
-        }
+    public SlingHttpServletRequestImpl(final SlingHttpServletRequestBuilderImpl builder) {
+        this.builder = builder;
     }
 
     @Override
     public Resource getResource() {
-        return this.resource;
+        return this.builder.resource;
     }
-    
+
     @Override
     public ResourceResolver getResourceResolver() {
         return this.getResource().getResourceResolver();
@@ -411,58 +95,61 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public HttpSession getSession(final boolean create) {
-        if (this.session == null && create) {
-            if ( this.sessionProvider != null ) {
-                this.session = this.sessionProvider.getSession(create);
+        if (this.builder.session == null && create) {
+            if ( this.builder.sessionProvider != null ) {
+                this.builder.session = this.builder.sessionProvider.getSession(create);
             } else {
-                this.session = new HttpSessionImpl(this.servletContext);
+                this.builder.session = new HttpSessionImpl(this.builder.servletContext);
            }
         }
-        return this.session;
+        if (this.builder.session == null) {
+            return null;
+        }
+        return new HttpSessionWrapper(this.builder.session);
     }
 
     @Override
     public RequestPathInfo getRequestPathInfo() {
-        return this.requestPathInfo;
+        return this.builder.requestPathInfo;
     }
 
     @Override
     public Object getAttribute(final String name) {
-        if ( this.attributesProvider != null ) {
-            return this.attributesProvider.getAttribute(name);
+        if ( this.builder.attributesProvider != null ) {
+            return this.builder.attributesProvider.getAttribute(name);
         }
-        return this.attributeMap.get(name);
+        return this.builder.attributeMap.get(name);
     }
 
     @Override
     public Enumeration<String> getAttributeNames() {
-        if ( this.attributesProvider != null ) {
-            return this.attributesProvider.getAttributeNames();
+        if ( this.builder.attributesProvider != null ) {
+            return this.builder.attributesProvider.getAttributeNames();
         }
-        return Collections.enumeration(this.attributeMap.keySet());
+        return Collections.enumeration(this.builder.attributeMap.keySet());
     }
 
     @Override
     public void removeAttribute(final String name) {
-        if ( this.attributesProvider != null ) {
-            this.attributesProvider.removeAttribute(name);
+        if ( this.builder.attributesProvider != null ) {
+            this.builder.attributesProvider.removeAttribute(name);
         } else {
-            this.attributeMap.remove(name);
+            this.builder.attributeMap.remove(name);
         }
     }
 
     @Override
     public void setAttribute(final String name, final Object object) {
-        if ( this.attributesProvider != null ) {
-            this.attributesProvider.setAttribute(name, object);
+        if ( this.builder.attributesProvider != null ) {
+            this.builder.attributesProvider.setAttribute(name, object);
         } else {
-            this.attributeMap.put(name, object);
+            this.builder.attributeMap.put(name, object);
         }
     }
 
     @Override
     public String getParameter(final String name) {
-        final String[] values = this.parameters.get(name);
+        final String[] values = this.builder.parameters.get(name);
         if (values != null && values.length > 0) {
             return values[0];
         }
@@ -471,17 +158,17 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public Map<String, String[]> getParameterMap() {
-        return Collections.unmodifiableMap(this.parameters);
+        return Collections.unmodifiableMap(this.builder.parameters);
     }
 
     @Override
     public Enumeration<String> getParameterNames() {
-        return Collections.enumeration(this.parameters.keySet());
+        return Collections.enumeration(this.builder.parameters.keySet());
     }
 
     @Override
-    public String[] getParameterValues(final String name) { 
-        return this.parameters.get(name);
+    public String[] getParameterValues(final String name) {
+        return this.builder.parameters.get(name);
     }
 
     @Override
@@ -491,10 +178,10 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public RequestParameterMap getRequestParameterMap() {
-        if ( this.requestParameterMap == null ) {
-            this.requestParameterMap = new RequestParameterMapImpl(this.parameters);
+        if ( this.builder.requestParameterMap == null ) {
+            this.builder.requestParameterMap = new RequestParameterMapImpl(this.builder.parameters);
         }
-        return this.requestParameterMap;
+        return this.builder.requestParameterMap;
     }
 
     @Override
@@ -523,7 +210,7 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public Locale getLocale() {
-        return this.locale;
+        return this.builder.locale;
     }
 
     @Override
@@ -533,75 +220,79 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public String getContextPath() {
-        return this.contextPath;
+        return this.builder.contextPath;
     }
 
     @Override
     public String getQueryString() {
-        return this.queryString;
+        return this.builder.queryString;
     }
 
     @Override
     public String getScheme() {
-        return this.scheme;
+        return this.builder.scheme;
     }
 
     @Override
     public String getServerName() {
-        return this.serverName;
+        return this.builder.serverName;
     }
 
     @Override
     public int getServerPort() {
-        return this.serverPort;
+        return this.builder.serverPort;
     }
 
     @Override
     public boolean isSecure() {
-        return SECURE_PROTOCOL.equals(this.scheme);
+        return SlingHttpServletRequestBuilderImpl.SECURE_PROTOCOL.equals(this.builder.scheme);
     }
 
     @Override
     public String getMethod() {
-        return this.requestMethod;
+        return this.builder.requestMethod;
     }
 
     @Override
     public long getDateHeader(final String name) {
-        return headerSupport.getDateHeader(name);
+        return builder.headerSupport.getDateHeader(name);
     }
 
     @Override
     public String getHeader(final String name) {
-        return headerSupport.getHeader(name);
+        return builder.headerSupport.getHeader(name);
     }
 
     @Override
     public Enumeration<String> getHeaderNames() {
-        return Collections.enumeration(headerSupport.getHeaderNames());
+        return Collections.enumeration(builder.headerSupport.getHeaderNames());
     }
 
     @Override
     public Enumeration<String> getHeaders(final String name) {
-        return Collections.enumeration(headerSupport.getHeaders(name));
+        return Collections.enumeration(builder.headerSupport.getHeaders(name));
     }
- 
+
     @Override
     public int getIntHeader(final String name) {
-        return headerSupport.getIntHeader(name);
+        return builder.headerSupport.getIntHeader(name);
     }
 
     @Override
     public Cookie getCookie(final String name) {
-        return this.cookies.get(name);
+        final jakarta.servlet.http.Cookie cookie = this.builder.cookies.get(name);
+        if (cookie != null) {
+            return new CookieWrapper(cookie);
+        }
+        return null;
     }
 
     @Override
     public Cookie[] getCookies() {
-        if ( this.cookies.isEmpty() ) {
+        if ( this.builder.cookies.isEmpty() ) {
             return null;
         }
-        return cookies.values().toArray(new Cookie[cookies.size()]);
+        return CookieWrapper.wrap(this.builder.cookies.values().toArray(new jakarta.servlet.http.Cookie[this.builder.cookies.size()]));
     }
 
     @Override
@@ -611,37 +302,37 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public ResourceBundle getResourceBundle(final String baseName, final Locale locale) {
-        return EMPTY_RESOURCE_BUNDLE;
+        return SlingHttpServletRequestBuilderImpl.EMPTY_RESOURCE_BUNDLE;
     }
 
     @Override
     public String getCharacterEncoding() {
-        return this.characterEncoding;
+        return this.builder.characterEncoding;
     }
 
     @Override
     public void setCharacterEncoding(final String encoding) throws UnsupportedEncodingException {
-        this.characterEncoding = encoding;
+        this.builder.characterEncoding = encoding;
     }
 
     @Override
     public String getContentType() {
-        if (this.contentType == null) {
+        if (this.builder.contentType == null) {
             return null;
-        } else if ( this.characterEncoding == null ) {
-            return this.contentType;
+        } else if ( this.builder.characterEncoding == null ) {
+            return this.builder.contentType;
         }
-        return this.contentType.concat(CHARSET_SEPARATOR).concat(this.characterEncoding);
+        return this.builder.contentType.concat(SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR).concat(this.builder.characterEncoding);
     }
 
     @Override
     public ServletInputStream getInputStream() {
-        if (getReaderCalled) {
+        if (this.builder.getReaderCalled) {
             throw new IllegalStateException();
         }
-        getInputStreamCalled = true;
+        this.builder.getInputStreamCalled = true;
         return new ServletInputStream() {
-            private final InputStream is = new ByteArrayInputStream(body.getBytes(StandardCharsets.UTF_8));
+            private final InputStream is = new ByteArrayInputStream(builder.body.getBytes(StandardCharsets.UTF_8));
 
             @Override
             public int read() throws IOException {
@@ -667,18 +358,18 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public BufferedReader getReader() {
-        if (getInputStreamCalled) {
+        if (this.builder.getInputStreamCalled) {
             throw new IllegalStateException();
         }
-        getReaderCalled = true;
-        return new BufferedReader(new StringReader(this.body));
+        this.builder.getReaderCalled = true;
+        return new BufferedReader(new StringReader(this.builder.body));
     }
 
     @Override
     public int getContentLength() {
-        return this.body.length();
+        return this.builder.body.length();
     }
-    
+
     @Override
     public long getContentLengthLong() {
         return this.getContentLength();
@@ -686,72 +377,88 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public RequestDispatcher getRequestDispatcher(final String path) {
-        if ( this.requestDispatcherProvider != null ) {
-            return this.requestDispatcherProvider.getRequestDispatcher(path);
+        if ( this.builder.requestDispatcherProvider != null ) {
+            jakarta.servlet.RequestDispatcher dispatcher = this.builder.requestDispatcherProvider.getRequestDispatcher(path);
+            if (dispatcher != null) {
+                return new RequestDispatcherWrapper(dispatcher);
+            }
+            return null;
         }
         throw new UnsupportedOperationException();
     }
 
     @Override
     public RequestDispatcher getRequestDispatcher(final String path, final RequestDispatcherOptions options) {
-        if ( this.requestDispatcherProvider != null ) {
-            return this.requestDispatcherProvider.getRequestDispatcher(path, options);
+        if ( this.builder.requestDispatcherProvider != null ) {
+            jakarta.servlet.RequestDispatcher dispatcher = this.builder.requestDispatcherProvider.getRequestDispatcher(path, options);
+            if (dispatcher != null) {
+                return new RequestDispatcherWrapper(dispatcher);
+            }
+            return null;
         }
         throw new UnsupportedOperationException();
     }
 
     @Override
     public RequestDispatcher getRequestDispatcher(final Resource resource) {
-        if ( this.requestDispatcherProvider != null ) {
-            return this.requestDispatcherProvider.getRequestDispatcher(resource);
+        if ( this.builder.requestDispatcherProvider != null ) {
+            jakarta.servlet.RequestDispatcher dispatcher = this.builder.requestDispatcherProvider.getRequestDispatcher(resource);
+            if (dispatcher != null) {
+                return new RequestDispatcherWrapper(dispatcher);
+            }
+            return null;
         }
         throw new UnsupportedOperationException();
     }
 
     @Override
     public RequestDispatcher getRequestDispatcher(final Resource resource, final RequestDispatcherOptions options) {
-        if ( this.requestDispatcherProvider != null ) {
-            return this.requestDispatcherProvider.getRequestDispatcher(resource, options);
+        if ( this.builder.requestDispatcherProvider != null ) {
+            jakarta.servlet.RequestDispatcher dispatcher = this.builder.requestDispatcherProvider.getRequestDispatcher(resource, options);
+            if (dispatcher != null) {
+                return new RequestDispatcherWrapper(dispatcher);
+            }
+            return null;
         }
         throw new UnsupportedOperationException();
     }
 
     @Override
     public String getRemoteUser() {
-        return remoteUser;
+        return this.builder.remoteUser;
     }
 
     @Override
     public String getRemoteAddr() {
-        return remoteAddr;
+        return this.builder.remoteAddr;
     }
 
     @Override
     public String getRemoteHost() {
-        return remoteHost;
+        return this.builder.remoteHost;
     }
 
     @Override
     public int getRemotePort() {
-        return remotePort;
+        return this.builder.remotePort;
     }
 
     @Override
     public String getServletPath() {
-        return this.servletPath;
+        return this.builder.servletPath;
     }
 
     @Override
-    public String getPathInfo() {        
-        return this.pathInfo;
+    public String getPathInfo() {
+        return this.builder.pathInfo;
     }
 
     @Override
     public String getRequestURI() {
         final StringBuilder requestUri = new StringBuilder();
-        requestUri.append(this.contextPath);
-        requestUri.append(this.servletPath);
-        requestUri.append(this.pathInfo);
+        requestUri.append(this.builder.contextPath);
+        requestUri.append(this.builder.servletPath);
+        requestUri.append(this.builder.pathInfo);
         return requestUri.toString();
     }
 
@@ -759,17 +466,17 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
     public StringBuffer getRequestURL() {
         final StringBuffer requestUrl = new StringBuffer();
 
-        requestUrl.append(this.scheme);
+        requestUrl.append(this.builder.scheme);
         requestUrl.append("://");
-        requestUrl.append(this.serverName);
+        requestUrl.append(this.builder.serverName);
         boolean includePort = true;
-        if ( (HTTP_PROTOCOL.equals(this.scheme) && this.serverPort == 80 )
-             || (SECURE_PROTOCOL.equals(this.scheme) && this.serverPort == 443) ) {
+        if ( (SlingHttpServletRequestBuilderImpl.HTTP_PROTOCOL.equals(this.builder.scheme) && this.builder.serverPort == 80 )
+             || (SlingHttpServletRequestBuilderImpl.SECURE_PROTOCOL.equals(this.builder.scheme) && this.builder.serverPort == 443) ) {
             includePort = false;
         }
         if ( includePort ) {
             requestUrl.append(':');
-            requestUrl.append(this.serverPort);
+            requestUrl.append(this.builder.serverPort);
         }
         requestUrl.append(getRequestURI());
 
@@ -778,27 +485,27 @@ public class SlingHttpServletRequestImpl extends SlingAdaptable
 
     @Override
     public String getAuthType() {
-        return this.authType;
+        return this.builder.authType;
     }
 
     @Override
     public String getResponseContentType() {
-        return responseContentType;
+        return this.builder.responseContentType;
     }
 
     @Override
     public Enumeration<String> getResponseContentTypes() {
-        return Collections.enumeration(Collections.singleton(responseContentType));
+        return Collections.enumeration(Collections.singleton(this.builder.responseContentType));
     }
 
     @Override
     public RequestProgressTracker getRequestProgressTracker() {
-        return this.progressTracker;
+        return this.builder.progressTracker;
     }
 
     @Override
     public ServletContext getServletContext() {
-        return this.servletContext;
+        return new ServletContextWrapper(this.builder.servletContext);
     }
 
     // --- unsupported operations ---
diff --git a/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseBuilderImpl.java b/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseBuilderImpl.java
new file mode 100644
index 0000000..ea50c20
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseBuilderImpl.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.request.builder.impl;
+
+import org.apache.sling.api.request.builder.SlingJakartaHttpServletResponseResult;
+import org.apache.sling.api.request.builder.SlingHttpServletResponseBuilder;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Internal {@link SlingHttpServletResponseBuilder} implementation.
+ */
+public class SlingHttpServletResponseBuilderImpl implements SlingHttpServletResponseBuilder {
+
+    /** Is the builder locked? */
+    private boolean locked = false;
+
+    private void checkLocked() {
+        if ( locked ) {
+            throw new IllegalStateException("The builder can't be reused. Create a new builder instead.");
+        }
+    }
+
+    @Override
+    @Deprecated
+    public @NotNull org.apache.sling.api.request.builder.SlingHttpServletResponseResult build() {
+        this.checkLocked();
+        this.locked = true;
+        return new SlingHttpServletResponseResultImpl();
+    }
+
+    @Override
+    public @NotNull SlingJakartaHttpServletResponseResult buildJakartaResponseResult() {
+        this.checkLocked();
+        this.locked = true;
+        return new SlingJakartaHttpServletResponseResultImpl();
+    }
+}
diff --git a/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImpl.java b/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseResultImpl.java
similarity index 90%
copy from src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImpl.java
copy to src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseResultImpl.java
index f9df5a4..fcbf78e 100644
--- a/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImpl.java
+++ b/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseResultImpl.java
@@ -34,22 +34,22 @@ import javax.servlet.WriteListener;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.adapter.SlingAdaptable;
-import org.apache.sling.api.request.builder.SlingHttpServletResponseBuilder;
 import org.apache.sling.api.request.builder.SlingHttpServletResponseResult;
 import org.jetbrains.annotations.NotNull;
 
 /**
- * Internal {@link SlingHttpServletResponse} implementation.
+ * Internal {@link SlingHttpServletResponseResultImpl} implementation.
+ * @deprecated
  */
-public class SlingHttpServletResponseImpl 
-    extends SlingAdaptable 
-    implements SlingHttpServletResponseResult, SlingHttpServletResponseBuilder {
+@Deprecated
+public class SlingHttpServletResponseResultImpl
+    extends SlingAdaptable
+    implements SlingHttpServletResponseResult {
 
     /** Headers */
     private final HeaderSupport headerSupport = new HeaderSupport();
-    
+
     /** Cookies */
     private final Map<String, Cookie> cookies = new LinkedHashMap<>();
 
@@ -70,26 +70,13 @@ public class SlingHttpServletResponseImpl
     private int bufferSize = 8192;
 
     private ByteArrayOutputStream outputStream;
-    
+
     private ServletOutputStream servletOutputStream;
-    
-    private PrintWriter printWriter;
-    
-    /** Is the builder locked? */
-    private boolean locked = false;
 
-    private void checkLocked() {
-        if ( locked ) {
-            throw new IllegalStateException("The builder can't be reused. Create a new builder instead.");
-        }
-    }
+    private PrintWriter printWriter;
 
-    @Override
-    public @NotNull SlingHttpServletResponseResult build() {
-        this.checkLocked();
-        this.locked = true;
+    public SlingHttpServletResponseResultImpl() {
         this.reset();
-        return this;
     }
 
     private void checkCommitted() {
@@ -115,16 +102,16 @@ public class SlingHttpServletResponseImpl
         } else if ( this.characterEncoding == null ) {
             return this.contentType;
         }
-        return this.contentType.concat(SlingHttpServletRequestImpl.CHARSET_SEPARATOR).concat(this.characterEncoding);
+        return this.contentType.concat(SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR).concat(this.characterEncoding);
     }
 
     @Override
     public void setContentType(final String type) {
         if (this.printWriter == null) {
-            final int pos = type == null ? -1 : type.indexOf(SlingHttpServletRequestImpl.CHARSET_SEPARATOR);
+            final int pos = type == null ? -1 : type.indexOf(SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR);
             if (pos != -1) {
                 this.contentType = type.substring(0, pos);
-                this.characterEncoding = type.substring(pos + SlingHttpServletRequestImpl.CHARSET_SEPARATOR.length());
+                this.characterEncoding = type.substring(pos + SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR.length());
             } else {
                 this.contentType = type;
             }
@@ -257,7 +244,7 @@ public class SlingHttpServletResponseImpl
                 public boolean isReady() {
                     return true;
                 }
-                
+
                 @Override
                 public void setWriteListener(final WriteListener writeListener) {
                     throw new UnsupportedOperationException();
@@ -324,7 +311,7 @@ public class SlingHttpServletResponseImpl
     @Override
     public long getContentLength() {
         return this.contentLength;
-    }    
+    }
 
     @Override
     public String getStatusMessage() {
diff --git a/src/main/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletRequestImpl.java b/src/main/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletRequestImpl.java
new file mode 100644
index 0000000..67b965b
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletRequestImpl.java
@@ -0,0 +1,608 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.request.builder.impl;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.adapter.SlingAdaptable;
+import org.apache.sling.api.request.RequestDispatcherOptions;
+import org.apache.sling.api.request.RequestParameter;
+import org.apache.sling.api.request.RequestParameterMap;
+import org.apache.sling.api.request.RequestPathInfo;
+import org.apache.sling.api.request.RequestProgressTracker;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import jakarta.servlet.AsyncContext;
+import jakarta.servlet.DispatcherType;
+import jakarta.servlet.ReadListener;
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.ServletConnection;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletInputStream;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpSession;
+import jakarta.servlet.http.HttpUpgradeHandler;
+import jakarta.servlet.http.Part;
+
+/**
+ * Internal {@link SlingJakartaHttpServletRequest} implementation.
+ */
+public class SlingJakartaHttpServletRequestImpl extends SlingAdaptable implements SlingJakartaHttpServletRequest {
+
+    private final SlingHttpServletRequestBuilderImpl builder;
+
+    public SlingJakartaHttpServletRequestImpl(final SlingHttpServletRequestBuilderImpl builder) {
+        this.builder = builder;
+    }
+
+    @Override
+    public Resource getResource() {
+        return this.builder.resource;
+    }
+
+    @Override
+    public ResourceResolver getResourceResolver() {
+        return this.getResource().getResourceResolver();
+    }
+
+    @Override
+    public HttpSession getSession() {
+        return getSession(true);
+    }
+
+    @Override
+    public HttpSession getSession(final boolean create) {
+        if (this.builder.session == null && create) {
+            if ( this.builder.sessionProvider != null ) {
+                this.builder.session = this.builder.sessionProvider.getSession(create);
+            } else {
+                this.builder.session = new HttpSessionImpl(this.builder.servletContext);
+           }
+        }
+        return this.builder.session;
+    }
+
+    @Override
+    public RequestPathInfo getRequestPathInfo() {
+        return this.builder.requestPathInfo;
+    }
+
+    @Override
+    public Object getAttribute(final String name) {
+        if ( this.builder.attributesProvider != null ) {
+            return this.builder.attributesProvider.getAttribute(name);
+        }
+        return this.builder.attributeMap.get(name);
+    }
+
+    @Override
+    public Enumeration<String> getAttributeNames() {
+        if ( this.builder.attributesProvider != null ) {
+            return this.builder.attributesProvider.getAttributeNames();
+        }
+        return Collections.enumeration(this.builder.attributeMap.keySet());
+    }
+
+    @Override
+    public void removeAttribute(final String name) {
+        if ( this.builder.attributesProvider != null ) {
+            this.builder.attributesProvider.removeAttribute(name);
+        } else {
+            this.builder.attributeMap.remove(name);
+        }
+    }
+
+    @Override
+    public void setAttribute(final String name, final Object object) {
+        if ( this.builder.attributesProvider != null ) {
+            this.builder.attributesProvider.setAttribute(name, object);
+        } else {
+            this.builder.attributeMap.put(name, object);
+        }
+    }
+
+    @Override
+    public String getParameter(final String name) {
+        final String[] values = this.builder.parameters.get(name);
+        if (values != null && values.length > 0) {
+            return values[0];
+        }
+        return null;
+    }
+
+    @Override
+    public Map<String, String[]> getParameterMap() {
+        return Collections.unmodifiableMap(this.builder.parameters);
+    }
+
+    @Override
+    public Enumeration<String> getParameterNames() {
+        return Collections.enumeration(this.builder.parameters.keySet());
+    }
+
+    @Override
+    public String[] getParameterValues(final String name) {
+        return this.builder.parameters.get(name);
+    }
+
+    @Override
+    public RequestParameter getRequestParameter(final String name) {
+        return this.getRequestParameterMap().getValue(name);
+    }
+
+    @Override
+    public RequestParameterMap getRequestParameterMap() {
+        if ( this.builder.requestParameterMap == null ) {
+            this.builder.requestParameterMap = new RequestParameterMapImpl(this.builder.parameters);
+        }
+        return this.builder.requestParameterMap;
+    }
+
+    @Override
+    public RequestParameter[] getRequestParameters(final String name) {
+        return this.getRequestParameterMap().get(name);
+    }
+
+    @Override
+    public List<RequestParameter> getRequestParameterList() {
+        final List<RequestParameter> params = new ArrayList<>();
+        for (final RequestParameter[] requestParameters : getRequestParameterMap().values()) {
+            params.addAll(Arrays.asList(requestParameters));
+        }
+        return params;
+    }
+
+    @Override
+    public Collection<Part> getParts() {
+        return Collections.emptyList();
+    }
+
+    @Override
+    public Part getPart(final String name) {
+        return null;
+    }
+
+    @Override
+    public Locale getLocale() {
+        return this.builder.locale;
+    }
+
+    @Override
+    public Enumeration<Locale> getLocales() {
+        return Collections.enumeration(Collections.singleton(getLocale()));
+    }
+
+    @Override
+    public String getContextPath() {
+        return this.builder.contextPath;
+    }
+
+    @Override
+    public String getQueryString() {
+        return this.builder.queryString;
+    }
+
+    @Override
+    public String getScheme() {
+        return this.builder.scheme;
+    }
+
+    @Override
+    public String getServerName() {
+        return this.builder.serverName;
+    }
+
+    @Override
+    public int getServerPort() {
+        return this.builder.serverPort;
+    }
+
+    @Override
+    public boolean isSecure() {
+        return SlingHttpServletRequestBuilderImpl.SECURE_PROTOCOL.equals(this.builder.scheme);
+    }
+
+    @Override
+    public String getMethod() {
+        return this.builder.requestMethod;
+    }
+
+    @Override
+    public long getDateHeader(final String name) {
+        return builder.headerSupport.getDateHeader(name);
+    }
+
+    @Override
+    public String getHeader(final String name) {
+        return builder.headerSupport.getHeader(name);
+    }
+
+    @Override
+    public Enumeration<String> getHeaderNames() {
+        return Collections.enumeration(builder.headerSupport.getHeaderNames());
+    }
+
+    @Override
+    public Enumeration<String> getHeaders(final String name) {
+        return Collections.enumeration(builder.headerSupport.getHeaders(name));
+    }
+
+    @Override
+    public int getIntHeader(final String name) {
+        return builder.headerSupport.getIntHeader(name);
+    }
+
+    @Override
+    public Cookie getCookie(final String name) {
+        return this.builder.cookies.get(name);
+    }
+
+    @Override
+    public Cookie[] getCookies() {
+        if ( this.builder.cookies.isEmpty() ) {
+            return null;
+        }
+        return this.builder.cookies.values().toArray(new Cookie[this.builder.cookies.size()]);
+    }
+
+    @Override
+    public ResourceBundle getResourceBundle(final Locale locale) {
+        return getResourceBundle(null, locale);
+    }
+
+    @Override
+    public ResourceBundle getResourceBundle(final String baseName, final Locale locale) {
+        return SlingHttpServletRequestBuilderImpl.EMPTY_RESOURCE_BUNDLE;
+    }
+
+    @Override
+    public String getCharacterEncoding() {
+        return this.builder.characterEncoding;
+    }
+
+    @Override
+    public void setCharacterEncoding(final String encoding) throws UnsupportedEncodingException {
+        this.builder.characterEncoding = encoding;
+    }
+
+    @Override
+    public String getContentType() {
+        if (this.builder.contentType == null) {
+            return null;
+        } else if ( this.builder.characterEncoding == null ) {
+            return this.builder.contentType;
+        }
+        return this.builder.contentType.concat(SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR).concat(this.builder.characterEncoding);
+    }
+
+    @Override
+    public ServletInputStream getInputStream() {
+        if (this.builder.getReaderCalled) {
+            throw new IllegalStateException();
+        }
+        this.builder.getInputStreamCalled = true;
+        return new ServletInputStream() {
+            private final InputStream is = new ByteArrayInputStream(builder.body.getBytes(StandardCharsets.UTF_8));
+
+            @Override
+            public int read() throws IOException {
+                return is.read();
+            }
+
+            @Override
+            public boolean isReady() {
+                return true;
+            }
+
+            @Override
+            public boolean isFinished() {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public void setReadListener(ReadListener readListener) {
+                throw new UnsupportedOperationException();
+            }
+        };
+    }
+
+    @Override
+    public BufferedReader getReader() {
+        if (this.builder.getInputStreamCalled) {
+            throw new IllegalStateException();
+        }
+        this.builder.getReaderCalled = true;
+        return new BufferedReader(new StringReader(this.builder.body));
+    }
+
+    @Override
+    public int getContentLength() {
+        return this.builder.body.length();
+    }
+
+    @Override
+    public long getContentLengthLong() {
+        return this.getContentLength();
+    }
+
+    @Override
+    public RequestDispatcher getRequestDispatcher(final String path) {
+        if ( this.builder.requestDispatcherProvider != null ) {
+            return this.builder.requestDispatcherProvider.getRequestDispatcher(path);
+        }
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public RequestDispatcher getRequestDispatcher(final String path, final RequestDispatcherOptions options) {
+        if ( this.builder.requestDispatcherProvider != null ) {
+            return this.builder.requestDispatcherProvider.getRequestDispatcher(path, options);
+        }
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public RequestDispatcher getRequestDispatcher(final Resource resource) {
+        if ( this.builder.requestDispatcherProvider != null ) {
+            return this.builder.requestDispatcherProvider.getRequestDispatcher(resource);
+        }
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public RequestDispatcher getRequestDispatcher(final Resource resource, final RequestDispatcherOptions options) {
+        if ( this.builder.requestDispatcherProvider != null ) {
+            return this.builder.requestDispatcherProvider.getRequestDispatcher(resource, options);
+        }
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getRemoteUser() {
+        return this.builder.remoteUser;
+    }
+
+    @Override
+    public String getRemoteAddr() {
+        return this.builder.remoteAddr;
+    }
+
+    @Override
+    public String getRemoteHost() {
+        return this.builder.remoteHost;
+    }
+
+    @Override
+    public int getRemotePort() {
+        return this.builder.remotePort;
+    }
+
+    @Override
+    public String getServletPath() {
+        return this.builder.servletPath;
+    }
+
+    @Override
+    public String getPathInfo() {
+        return this.builder.pathInfo;
+    }
+
+    @Override
+    public String getRequestURI() {
+        final StringBuilder requestUri = new StringBuilder();
+        requestUri.append(this.builder.contextPath);
+        requestUri.append(this.builder.servletPath);
+        requestUri.append(this.builder.pathInfo);
+        return requestUri.toString();
+    }
+
+    @Override
+    public StringBuffer getRequestURL() {
+        final StringBuffer requestUrl = new StringBuffer();
+
+        requestUrl.append(this.builder.scheme);
+        requestUrl.append("://");
+        requestUrl.append(this.builder.serverName);
+        boolean includePort = true;
+        if ( (SlingHttpServletRequestBuilderImpl.HTTP_PROTOCOL.equals(this.builder.scheme) && this.builder.serverPort == 80 )
+             || (SlingHttpServletRequestBuilderImpl.SECURE_PROTOCOL.equals(this.builder.scheme) && this.builder.serverPort == 443) ) {
+            includePort = false;
+        }
+        if ( includePort ) {
+            requestUrl.append(':');
+            requestUrl.append(this.builder.serverPort);
+        }
+        requestUrl.append(getRequestURI());
+
+        return requestUrl;
+    }
+
+    @Override
+    public String getAuthType() {
+        return this.builder.authType;
+    }
+
+    @Override
+    public String getResponseContentType() {
+        return this.builder.responseContentType;
+    }
+
+    @Override
+    public Enumeration<String> getResponseContentTypes() {
+        return Collections.enumeration(Collections.singleton(this.builder.responseContentType));
+    }
+
+    @Override
+    public RequestProgressTracker getRequestProgressTracker() {
+        return this.builder.progressTracker;
+    }
+
+    @Override
+    public ServletContext getServletContext() {
+        return this.builder.servletContext;
+    }
+
+    // --- unsupported operations ---
+
+    @Override
+    public String getPathTranslated() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getRequestedSessionId() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Principal getUserPrincipal() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean isRequestedSessionIdFromCookie() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean isRequestedSessionIdFromURL() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean isRequestedSessionIdValid() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean isUserInRole(String role) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getLocalAddr() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getLocalName() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int getLocalPort() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getProtocol() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean authenticate(HttpServletResponse response) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void login(String pUsername, String password) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void logout() throws ServletException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public AsyncContext startAsync() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean isAsyncStarted() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean isAsyncSupported() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public AsyncContext getAsyncContext() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public DispatcherType getDispatcherType() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String changeSessionId() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getProtocolRequestId() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getRequestId() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public ServletConnection getServletConnection() {
+        throw new UnsupportedOperationException();
+    }
+}
diff --git a/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImpl.java b/src/main/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletResponseResultImpl.java
similarity index 84%
rename from src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImpl.java
rename to src/main/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletResponseResultImpl.java
index f9df5a4..4cf9941 100644
--- a/src/main/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImpl.java
+++ b/src/main/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletResponseResultImpl.java
@@ -29,27 +29,25 @@ import java.util.LinkedHashMap;
 import java.util.Locale;
 import java.util.Map;
 
-import javax.servlet.ServletOutputStream;
-import javax.servlet.WriteListener;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.adapter.SlingAdaptable;
-import org.apache.sling.api.request.builder.SlingHttpServletResponseBuilder;
-import org.apache.sling.api.request.builder.SlingHttpServletResponseResult;
+import org.apache.sling.api.request.builder.SlingJakartaHttpServletResponseResult;
 import org.jetbrains.annotations.NotNull;
 
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.WriteListener;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletResponse;
+
 /**
- * Internal {@link SlingHttpServletResponse} implementation.
+ * Internal {@link SlingJakartaHttpServletResponseResultImpl} implementation.
  */
-public class SlingHttpServletResponseImpl 
-    extends SlingAdaptable 
-    implements SlingHttpServletResponseResult, SlingHttpServletResponseBuilder {
+public class SlingJakartaHttpServletResponseResultImpl
+    extends SlingAdaptable
+    implements SlingJakartaHttpServletResponseResult {
 
     /** Headers */
     private final HeaderSupport headerSupport = new HeaderSupport();
-    
+
     /** Cookies */
     private final Map<String, Cookie> cookies = new LinkedHashMap<>();
 
@@ -70,26 +68,13 @@ public class SlingHttpServletResponseImpl
     private int bufferSize = 8192;
 
     private ByteArrayOutputStream outputStream;
-    
+
     private ServletOutputStream servletOutputStream;
-    
-    private PrintWriter printWriter;
-    
-    /** Is the builder locked? */
-    private boolean locked = false;
 
-    private void checkLocked() {
-        if ( locked ) {
-            throw new IllegalStateException("The builder can't be reused. Create a new builder instead.");
-        }
-    }
+    private PrintWriter printWriter;
 
-    @Override
-    public @NotNull SlingHttpServletResponseResult build() {
-        this.checkLocked();
-        this.locked = true;
+    public SlingJakartaHttpServletResponseResultImpl() {
         this.reset();
-        return this;
     }
 
     private void checkCommitted() {
@@ -115,16 +100,16 @@ public class SlingHttpServletResponseImpl
         } else if ( this.characterEncoding == null ) {
             return this.contentType;
         }
-        return this.contentType.concat(SlingHttpServletRequestImpl.CHARSET_SEPARATOR).concat(this.characterEncoding);
+        return this.contentType.concat(SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR).concat(this.characterEncoding);
     }
 
     @Override
     public void setContentType(final String type) {
         if (this.printWriter == null) {
-            final int pos = type == null ? -1 : type.indexOf(SlingHttpServletRequestImpl.CHARSET_SEPARATOR);
+            final int pos = type == null ? -1 : type.indexOf(SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR);
             if (pos != -1) {
                 this.contentType = type.substring(0, pos);
-                this.characterEncoding = type.substring(pos + SlingHttpServletRequestImpl.CHARSET_SEPARATOR.length());
+                this.characterEncoding = type.substring(pos + SlingHttpServletRequestBuilderImpl.CHARSET_SEPARATOR.length());
             } else {
                 this.contentType = type;
             }
@@ -141,12 +126,6 @@ public class SlingHttpServletResponseImpl
         this.contentLength = len;
     }
 
-    @Override
-    public void setStatus(final int sc, final String message) {
-        setStatus(sc);
-        this.statusMessage = message;
-    }
-
     @Override
     public void setStatus(final int sc) {
         this.status = sc;
@@ -257,7 +236,7 @@ public class SlingHttpServletResponseImpl
                 public boolean isReady() {
                     return true;
                 }
-                
+
                 @Override
                 public void setWriteListener(final WriteListener writeListener) {
                     throw new UnsupportedOperationException();
@@ -324,7 +303,7 @@ public class SlingHttpServletResponseImpl
     @Override
     public long getContentLength() {
         return this.contentLength;
-    }    
+    }
 
     @Override
     public String getStatusMessage() {
@@ -367,21 +346,11 @@ public class SlingHttpServletResponseImpl
     }
 
     // --- unsupported operations ---
-    @Override
-    public String encodeRedirectUrl(String url) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public String encodeRedirectURL(String url) {
         throw new UnsupportedOperationException();
     }
 
-    @Override
-    public String encodeUrl(String url) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public String encodeURL(String url) {
         throw new UnsupportedOperationException();
diff --git a/src/main/java/org/apache/sling/api/request/builder/package-info.java b/src/main/java/org/apache/sling/api/request/builder/package-info.java
index e818dbc..0eddb89 100644
--- a/src/main/java/org/apache/sling/api/request/builder/package-info.java
+++ b/src/main/java/org/apache/sling/api/request/builder/package-info.java
@@ -16,5 +16,5 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-@org.osgi.annotation.versioning.Version("1.3")
+@org.osgi.annotation.versioning.Version("1.4")
 package org.apache.sling.api.request.builder;
diff --git a/src/main/java/org/apache/sling/api/request/header/MediaRangeList.java b/src/main/java/org/apache/sling/api/request/header/JakartaMediaRangeList.java
similarity index 96%
copy from src/main/java/org/apache/sling/api/request/header/MediaRangeList.java
copy to src/main/java/org/apache/sling/api/request/header/JakartaMediaRangeList.java
index 430c158..80b70cd 100644
--- a/src/main/java/org/apache/sling/api/request/header/MediaRangeList.java
+++ b/src/main/java/org/apache/sling/api/request/header/JakartaMediaRangeList.java
@@ -22,7 +22,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
 
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
 
 import org.osgi.annotation.versioning.ConsumerType;
 import org.slf4j.Logger;
@@ -31,16 +31,17 @@ import org.slf4j.LoggerFactory;
 /**
  * Facilitates parsing of the Accept HTTP request header.
  * See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">RFC 2616 section 14.1</a>
+ * @since 1.1.0
  */
 @ConsumerType
-public class MediaRangeList extends TreeSet<MediaRangeList.MediaRange> {
+public class JakartaMediaRangeList extends TreeSet<JakartaMediaRangeList.MediaRange> {
 
     public static final String HEADER_ACCEPT = "Accept";
     public static final String PARAM_ACCEPT = ":http-equiv-accept";
     public static final String WILDCARD = "*";
     boolean matchesAll = false;
 
-    private static final Logger log = LoggerFactory.getLogger(MediaRangeList.class);
+    private static final Logger log = LoggerFactory.getLogger(JakartaMediaRangeList.class);
 
     /**
      * Constructs a <code>MediaRangeList</code> using information from the supplied <code>HttpServletRequest</code>.
@@ -48,10 +49,10 @@ public class MediaRangeList extends TreeSet<MediaRangeList.MediaRange> {
      * {@link #HEADER_ACCEPT} header value.
      * If the request contains no {@link #PARAM_ACCEPT} parameter, or the parameter value is empty, the value of the
      * {@link #HEADER_ACCEPT} is used. If both values are missing, it is assumed that the client accepts all media types,
-     * as per the RFC. See also {@link MediaRangeList#MediaRangeList(java.lang.String)}
+     * as per the RFC. See also {@link #JakartaMediaRangeList(java.lang.String)}
      * @param request The <code>HttpServletRequest</code> to extract a <code>MediaRangeList</code> from
      */
-    public MediaRangeList(HttpServletRequest request) {
+    public JakartaMediaRangeList(HttpServletRequest request) {
         String queryParam = request.getParameter(PARAM_ACCEPT);
         if (queryParam != null && queryParam.trim().length() != 0) {
             init(queryParam);
@@ -71,7 +72,7 @@ public class MediaRangeList extends TreeSet<MediaRangeList.MediaRange> {
      *
      * @param listStr The list of media range specifications
      */
-    public MediaRangeList(String listStr) {
+    public JakartaMediaRangeList(String listStr) {
         try {
             init(listStr);
         } catch (Throwable t) {
@@ -119,7 +120,7 @@ public class MediaRangeList extends TreeSet<MediaRangeList.MediaRange> {
 
     /**
      * Given a list of media types, returns the one is preferred by this <code>MediaRangeList</code>.
-     * @param mediaRanges An array of possible {@link MediaRangeList.MediaRange}s
+     * @param mediaRanges An array of possible {@link JakartaMediaRangeList.MediaRange}s
      * @return One of the <code>mediaRanges</code> that this <code>MediaRangeList</code> prefers;
      * or <code>null</code> if this <code>MediaRangeList</code> does not contain any of the <code>mediaRanges</code>
      * @throws NullPointerException if <code>mediaRanges</code> is <code>null</code> or contains a <code>null</code> value
diff --git a/src/main/java/org/apache/sling/api/request/header/MediaRangeList.java b/src/main/java/org/apache/sling/api/request/header/MediaRangeList.java
index 430c158..4ee27f2 100644
--- a/src/main/java/org/apache/sling/api/request/header/MediaRangeList.java
+++ b/src/main/java/org/apache/sling/api/request/header/MediaRangeList.java
@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Facilitates parsing of the Accept HTTP request header.
  * See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">RFC 2616 section 14.1</a>
+ * @deprecated Use {@link org.apache.sling.api.request.header.JakartaMediaRangeList} instead.
  */
 @ConsumerType
 public class MediaRangeList extends TreeSet<MediaRangeList.MediaRange> {
diff --git a/src/main/java/org/apache/sling/api/request/header/package-info.java b/src/main/java/org/apache/sling/api/request/header/package-info.java
index 386b026..a7085e2 100644
--- a/src/main/java/org/apache/sling/api/request/header/package-info.java
+++ b/src/main/java/org/apache/sling/api/request/header/package-info.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-@Version("1.0.0")
+@Version("1.1.0")
 package org.apache.sling.api.request.header;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/request/package-info.java b/src/main/java/org/apache/sling/api/request/package-info.java
index f265b91..f58c43f 100644
--- a/src/main/java/org/apache/sling/api/request/package-info.java
+++ b/src/main/java/org/apache/sling/api/request/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("2.7.0")
+@Version("2.8.0")
 package org.apache.sling.api.request;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/resource/Resource.java b/src/main/java/org/apache/sling/api/resource/Resource.java
index 5907637..c2dd000 100644
--- a/src/main/java/org/apache/sling/api/resource/Resource.java
+++ b/src/main/java/org/apache/sling/api/resource/Resource.java
@@ -57,7 +57,7 @@ public interface Resource extends Adaptable {
      *
      * @see #getResourceType()
      * @see ResourceUtil#isNonExistingResource(Resource)
-     * @see ResourceResolver#resolve(javax.servlet.http.HttpServletRequest,
+     * @see ResourceResolver#resolve(jakarta.servlet.http.HttpServletRequest,
      *      String)
      */
     String RESOURCE_TYPE_NON_EXISTING = "sling:nonexisting";
diff --git a/src/main/java/org/apache/sling/api/resource/ResourceResolver.java b/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
index 8ec4708..4b1b7ff 100644
--- a/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
+++ b/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
@@ -24,7 +24,7 @@ import java.util.Map;
 
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.annotations.NotNull;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
 
 import org.apache.sling.api.adapter.Adaptable;
 import org.apache.sling.api.resource.mapping.ResourceMapper;
@@ -147,8 +147,8 @@ public interface ResourceResolver extends Adaptable, Closeable {
 
     /**
      * A request attribute containing the workspace to use for
-     * {@link #resolve(HttpServletRequest)} and
-     * {@link #resolve(HttpServletRequest, String)} if not the default workspace
+     * {@link #resolve(javax.servlet.http.HttpServletRequest)} and
+     * {@link #resolve(javax.servlet.http.HttpServletRequest, String)} if not the default workspace
      * should be used to resolve the resource.
      *
      * @since 2.1 (Sling API Bundle 2.1.0)
@@ -207,18 +207,52 @@ public interface ResourceResolver extends Adaptable, Closeable {
      *             thrown if an error occurs trying to resolve the resource.
      * @throws IllegalStateException if this resource resolver has already been
      *             {@link #close() closed}.
-     * @since 2.0.4 (Sling API Bundle 2.0.4)
+     * @since 2.14.0
      * @see <a href="https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a>
      */
     @NotNull Resource resolve(@NotNull HttpServletRequest request, @NotNull String absPath);
 
+    /**
+     * Resolves the resource from the given <code>absPath</code> optionally
+     * taking <code>HttpServletRequest</code> into account, such as the value of
+     * the <code>Host</code> request header. Returns a
+     * {@link NonExistingResource} if the path cannot be resolved to an existing
+     * and accessible resource.
+     * <p>
+     * The difference between this method and the {@link #resolve(String)}
+     * method is, that this method may take request properties like the scheme,
+     * the host header or request parameters into account to resolve the
+     * resource.
+     *
+     * @param request The http servlet request object providing more hints at
+     *            how to resolve the <code>absPath</code>. This parameter may be
+     *            <code>null</code> in which case the implementation should use
+     *            reasonable defaults.
+     * @param absPath The absolute path to be resolved to a resource. If this
+     *            parameter is <code>null</code>, it is assumed to address the
+     *            root of the resource tree. If the path is relative it is
+     *            assumed relative to the root, that is a slash is prepended to
+     *            the path before resolving it.
+     * @return The {@link Resource} addressed by the <code>absPath</code> or a
+     *         {@link NonExistingResource} if no such resource can be resolved.
+     * @throws org.apache.sling.api.SlingException Or a subclass thereof may be
+     *             thrown if an error occurs trying to resolve the resource.
+     * @throws IllegalStateException if this resource resolver has already been
+     *             {@link #close() closed}.
+     * @since 2.0.4 (Sling API Bundle 2.0.4)
+     * @see <a href="https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a>
+     * @deprecated Use {@link #resolve(HttpServletRequest, String)} instead.
+     */
+    @Deprecated
+    @NotNull Resource resolve(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull String absPath);
+
     /**
      * Resolves the resource from the given absolute path. Returns a
      * {@link NonExistingResource} if the path cannot be resolved to an existing
      * and accessible resource.
      * <p>
      * This method is intended to apply the same algorithm to the absolute path
-     * as is used by the {@link #resolve(HttpServletRequest)} method except for
+     * as is used by the {@link #resolve(HttpServletRequest, String)} method except for
      * cases where the latter uses request property such as request headers or
      * request parameters to resolve a resource.
      * <p>
@@ -268,7 +302,7 @@ public interface ResourceResolver extends Adaptable, Closeable {
      * @see <a href="https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a>
      */
     @Deprecated
-    @NotNull Resource resolve(@NotNull HttpServletRequest request);
+    @NotNull Resource resolve(@NotNull javax.servlet.http.HttpServletRequest request);
 
     /**
      * Returns a (request) path mapped from the (resource) path applying the reverse
@@ -287,15 +321,15 @@ public interface ResourceResolver extends Adaptable, Closeable {
      * {@link #resolve(String)} method.
      * <p>
      * This method also does percent-encoding before returning the (request) path
-     * (with charset UTF-8). Due to this calling this method multiple times in a nested 
+     * (with charset UTF-8). Due to this calling this method multiple times in a nested
      * fashion might lead to an invalid (request) path which can subsequently not
-     * be resolved via {@link #resolve(String)}. 
+     * be resolved via {@link #resolve(String)}.
      *
      * @param resourcePath The path for which to return a mapped path.
      * @return The mapped path or {@code resourcePath} in case no mapping is found.
      * @throws IllegalStateException if this resource resolver has already been
      *             {@link #close() closed}.
-     * 
+     *
      * @see ResourceMapper#getMapping(String, HttpServletRequest)
      * @see <a href="https://tools.ietf.org/html/rfc3986#section-2.1">Percent-Encoding</a>
      * @see <a href="https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a>
@@ -322,9 +356,9 @@ public interface ResourceResolver extends Adaptable, Closeable {
      * servlet context path and the actual path used to resolve the resource.
      * <p>
      * This method also does percent-encoding before returning the URL
-     * (with charset UTF-8). Due to this calling this method multiple times in a nested 
+     * (with charset UTF-8). Due to this calling this method multiple times in a nested
      * fashion might lead to an invalid URL which can subsequently not
-     * be resolved via {@link #resolve(String)}. 
+     * be resolved via {@link #resolve(String)}.
      *
      * @param request The http servlet request object which may be used to apply
      *            more mapping functionality.
@@ -332,14 +366,54 @@ public interface ResourceResolver extends Adaptable, Closeable {
      * @return The mapped URL or {@code resourcePath} in case no mapping is found.
      * @throws IllegalStateException if this resource resolver has already been
      *             {@link #close() closed}.
-     * @since 2.0.4 (Sling API Bundle 2.0.4)
-     * 
+     * @since 2.14.0 (Sling API Bundle 2.0.4)
+     *
      * @see ResourceMapper#getMapping(String, HttpServletRequest)
      * @see <a href="https://tools.ietf.org/html/rfc3986#section-2.1">Percent-Encoding</a>
      * @see <a href="https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a>
      */
     @NotNull String map(@NotNull HttpServletRequest request, @NotNull String resourcePath);
 
+    /**
+     * Returns an URL mapped from the (resource) path applying the reverse
+     * mapping used by the {@link #resolve(HttpServletRequest, String)} such
+     * that when the path is given to the
+     * {@link #resolve(HttpServletRequest, String)} method the same resource is
+     * returned.
+     * <p>
+     * Note, that technically the <code>resourcePath</code> need not refer to an
+     * existing resource. This method just applies the mappings and returns the
+     * resulting string. If the <code>resourcePath</code> does not address an
+     * existing resource roundtripping may of course not work and calling
+     * {@link #resolve(HttpServletRequest, String)} with the path returned may
+     * return <code>null</code>.
+     * <p>
+     * This method is intended as the reverse operation of the
+     * {@link #resolve(HttpServletRequest, String)} method. As such the URL
+     * returned is expected to be an absolute URL including scheme, host, any
+     * servlet context path and the actual path used to resolve the resource.
+     * <p>
+     * This method also does percent-encoding before returning the URL
+     * (with charset UTF-8). Due to this calling this method multiple times in a nested
+     * fashion might lead to an invalid URL which can subsequently not
+     * be resolved via {@link #resolve(String)}.
+     *
+     * @param request The http servlet request object which may be used to apply
+     *            more mapping functionality.
+     * @param resourcePath The path for which to return a mapped path.
+     * @return The mapped URL or {@code resourcePath} in case no mapping is found.
+     * @throws IllegalStateException if this resource resolver has already been
+     *             {@link #close() closed}.
+     * @since 2.0.4 (Sling API Bundle 2.0.4)
+     *
+     * @see ResourceMapper#getMapping(String, HttpServletRequest)
+     * @see <a href="https://tools.ietf.org/html/rfc3986#section-2.1">Percent-Encoding</a>
+     * @see <a href="https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a>
+     * @deprecated Use {@link #map(HttpServletRequest, String)} instead.
+     */
+    @Deprecated
+    @NotNull String map(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull String resourcePath);
+
     /**
      * Returns a {@link Resource} object for data located at the given path.
      * <p>
@@ -699,9 +773,9 @@ public interface ResourceResolver extends Adaptable, Closeable {
 
     /**
      * Orders the child resources returned by {@link #getChildren(Resource)} and {@link #listChildren(Resource)} so that a given resource is listed before the given sibling resource.
-     * 
+     *
      * The changes are transient and require a call to {@link #commit()} for persisting.
-     * 
+     *
      * @param parent the parent resource containing the child resources to order.
      * @param name the name of the child resource in {@code parent} to order. Must be an existing child name.
      * @param followingSiblingName the name of the resource child in {@code parent} which should come after the reordered resource. If {@code null} is given the resource is ordered as last among all sibling resources.
diff --git a/src/main/java/org/apache/sling/api/resource/mapping/ResourceMapper.java b/src/main/java/org/apache/sling/api/resource/mapping/ResourceMapper.java
index a302469..2c441f1 100644
--- a/src/main/java/org/apache/sling/api/resource/mapping/ResourceMapper.java
+++ b/src/main/java/org/apache/sling/api/resource/mapping/ResourceMapper.java
@@ -20,7 +20,7 @@ package org.apache.sling.api.resource.mapping;
 
 import java.util.Collection;
 
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
 
 import org.apache.sling.api.resource.ResourceResolver;
 import org.jetbrains.annotations.NotNull;
@@ -28,19 +28,19 @@ import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * Allows access to resource mappings
- * 
+ *
  * <p>This interface superceeds the resource mapping functionality present
  * in the {@link ResourceResolver}. Although the methods present in that
  * interface will continue to work, the resource mapper will provide better
  * APIs to access the resource mappings.</p>
- * 
+ *
  * <p>Implementations of this class are obtained by adapting a {@link ResourceResolver}
  * instance. As such, the mappings returned by its methods reflect the repository
- * permissions of the underyling resolver instance.</p> 
+ * permissions of the underyling resolver instance.</p>
  */
 @ProviderType
 public interface ResourceMapper {
-    
+
     /**
      * Returns a path mapped from the (resource) path applying the reverse
      * mapping used by the {@link ResourceResolver#resolve(String)} such that when the path is
@@ -91,20 +91,51 @@ public interface ResourceMapper {
      * @return The mapped URL.
      * @throws IllegalStateException if the underlying resource resolver has already been
      *             {@link ResourceResolver#close() closed}.
-     * @since 1.0.0 (Sling API Bundle 2.19.0)
+     * @since 1.1.0
      */
     @NotNull String getMapping(@NotNull String resourcePath, @NotNull HttpServletRequest request);
-    
+
+    /**
+     * Returns an URL mapped from the (resource) path applying the reverse
+     * mapping used by the {@link ResourceResolver#resolve(HttpServletRequest, String)} such
+     * that when the path is given to the
+     * {@link ResourceResolver#resolve(HttpServletRequest, String)} method the same resource is
+     * returned.
+     * <p>
+     * Note, that technically the <code>resourcePath</code> need not refer to an
+     * existing resource. This method just applies the mappings and returns the
+     * resulting string. If the <code>resourcePath</code> does not address an
+     * existing resource roundtripping may of course not work and calling
+     * {@link ResourceResolver#resolve(HttpServletRequest, String)} with the path returned may
+     * return <code>null</code>.
+     * <p>
+     * This method is intended as the reverse operation of the
+     * {@link ResourceResolver#resolve(HttpServletRequest, String)} method. As such the URL
+     * returned is expected to be an absolute URL including scheme, host, any
+     * servlet context path and the actual path used to resolve the resource.
+
+     * @param resourcePath The path for which to return a mapped path.
+     * @param request The http servlet request object which may be used to apply
+     *            more mapping functionality.
+     * @return The mapped URL.
+     * @throws IllegalStateException if the underlying resource resolver has already been
+     *             {@link ResourceResolver#close() closed}.
+     * @since 1.0.0 (Sling API Bundle 2.19.0)
+     * @deprecated Use {@link #getMapping(String, HttpServletRequest)} instead.
+     */
+    @Deprecated
+    @NotNull String getMapping(@NotNull String resourcePath, @NotNull javax.servlet.http.HttpServletRequest request);
+
     /**
      * Returns all possible mappings for a given {@code resourcePath} as paths.
-     * 
+     *
      * <p>
      * This method differs from the {@link #getMapping(String)} variant
      * by guaranteeing that all possible mappings are returned for a specified path.
-     * 
+     *
      * <p>
      * The mappings are not returned in any particular order.
-     * 
+     *
      * @param resourcePath The path for which to return a mapped path.
      * @return a collection of mapped URLs, in no particular order. May not be null or empty.
      * @throws IllegalStateException if the underlying resource resolver has already been
@@ -115,14 +146,14 @@ public interface ResourceMapper {
 
     /**
      * Returns all possible mappings for a given {@code resourcePath} as URLs.
-     * 
+     *
      * <p>
      * This method differs from the {@link #getMapping(String, HttpServletRequest)} variant
      * by guaranteeing that all possible mappings are returned for a specified path.
-     * 
+     *
      * <p>
      * The mappings are not returned in any particular order.
-     * 
+     *
      * @param resourcePath The path for which to return a mapped path.
      * @param request The http servlet request object which may be used to apply
      *            more mapping functionality.
@@ -130,7 +161,30 @@ public interface ResourceMapper {
      * @return a collection of mapped URLs, in no particular order. May not be null or empty.
      * @throws IllegalStateException if the underlying resource resolver has already been
      *             {@link ResourceResolver#close() closed}.
-     * @since 1.0.0 (Sling API Bundle 2.19.0)
+     * @since 1.1.0
      */
     Collection<String> getAllMappings(@NotNull String resourcePath, @NotNull HttpServletRequest request);
+
+    /**
+     * Returns all possible mappings for a given {@code resourcePath} as URLs.
+     *
+     * <p>
+     * This method differs from the {@link #getMapping(String, HttpServletRequest)} variant
+     * by guaranteeing that all possible mappings are returned for a specified path.
+     *
+     * <p>
+     * The mappings are not returned in any particular order.
+     *
+     * @param resourcePath The path for which to return a mapped path.
+     * @param request The http servlet request object which may be used to apply
+     *            more mapping functionality.
+
+     * @return a collection of mapped URLs, in no particular order. May not be null or empty.
+     * @throws IllegalStateException if the underlying resource resolver has already been
+     *             {@link ResourceResolver#close() closed}.
+     * @since 1.0.0 (Sling API Bundle 2.19.0)
+     * @deprecated Use {@link #getAllMappings(String, HttpServletRequest)} instead.
+     */
+    @Deprecated
+    Collection<String> getAllMappings(@NotNull String resourcePath, @NotNull javax.servlet.http.HttpServletRequest request);
 }
diff --git a/src/main/java/org/apache/sling/api/resource/mapping/package-info.java b/src/main/java/org/apache/sling/api/resource/mapping/package-info.java
index e871225..00a1ea1 100644
--- a/src/main/java/org/apache/sling/api/resource/mapping/package-info.java
+++ b/src/main/java/org/apache/sling/api/resource/mapping/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("1.0.1")
+@Version("1.1.0")
 package org.apache.sling.api.resource.mapping;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/resource/package-info.java b/src/main/java/org/apache/sling/api/resource/package-info.java
index 9ec07b2..d46625b 100644
--- a/src/main/java/org/apache/sling/api/resource/package-info.java
+++ b/src/main/java/org/apache/sling/api/resource/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("2.13.2")
+@Version("2.14.0")
 package org.apache.sling.api.resource;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/scripting/ScriptEvaluationException.java b/src/main/java/org/apache/sling/api/scripting/ScriptEvaluationException.java
index 753882b..7c8ace7 100644
--- a/src/main/java/org/apache/sling/api/scripting/ScriptEvaluationException.java
+++ b/src/main/java/org/apache/sling/api/scripting/ScriptEvaluationException.java
@@ -22,7 +22,7 @@ import org.apache.sling.api.SlingException;
 
 /**
  * The <code>ScriptEvaluationException</code> is thrown by the
- * {@link SlingScript#eval(SlingBindings)} method if an error occurrs evaluating
+ * {@link SlingJakartaScript#eval(SlingJakartaBindings)} method if an error occurrs evaluating
  * the script.
  */
 public class ScriptEvaluationException extends SlingException {
diff --git a/src/main/java/org/apache/sling/api/scripting/SlingBindings.java b/src/main/java/org/apache/sling/api/scripting/SlingBindings.java
index bdc32f7..154c8f9 100644
--- a/src/main/java/org/apache/sling/api/scripting/SlingBindings.java
+++ b/src/main/java/org/apache/sling/api/scripting/SlingBindings.java
@@ -33,7 +33,9 @@ import org.slf4j.Logger;
  * for script execution. The constants in this class define names of variables
  * which <em>MUST</em> or <em>MAY</em> be provided for the script execution.
  * Other variables may be define as callers see fit.
+ * @deprecated Use {@link SlingJakartaBindings} instead.
  */
+@Deprecated
 public class SlingBindings extends LazyBindings {
 
     private static final long serialVersionUID = 209505693646323450L;
diff --git a/src/main/java/org/apache/sling/api/scripting/SlingBindings.java b/src/main/java/org/apache/sling/api/scripting/SlingJakartaBindings.java
similarity index 84%
copy from src/main/java/org/apache/sling/api/scripting/SlingBindings.java
copy to src/main/java/org/apache/sling/api/scripting/SlingJakartaBindings.java
index bdc32f7..6cd721b 100644
--- a/src/main/java/org/apache/sling/api/scripting/SlingBindings.java
+++ b/src/main/java/org/apache/sling/api/scripting/SlingJakartaBindings.java
@@ -21,29 +21,28 @@ package org.apache.sling.api.scripting;
 import java.io.PrintWriter;
 import java.io.Reader;
 
-import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 
 /**
- * The <code>SlingBindings</code> class is used to prepare global variables
+ * The <code>SlingJakartaBindings</code> class is used to prepare global variables
  * for script execution. The constants in this class define names of variables
  * which <em>MUST</em> or <em>MAY</em> be provided for the script execution.
  * Other variables may be define as callers see fit.
+ * @since 2.6.0
  */
-public class SlingBindings extends LazyBindings {
+public class SlingJakartaBindings extends LazyBindings {
 
-    private static final long serialVersionUID = 209505693646323450L;
-
-    /**
+   /**
      * The name of the global scripting variable providing the
-     * {@link org.apache.sling.api.SlingHttpServletRequest} object (value is
+     * {@link org.apache.sling.api.SlingJakartaHttpServletRequest} object (value is
      * "request"). The value of the scripting variable is the same as that
      * returned by the
-     * {@link org.apache.sling.api.scripting.SlingScriptHelper#getRequest()}
+     * {@link org.apache.sling.api.scripting.SlingJakartaScriptHelper#getRequest()}
      * method.
      * <p>
      * This bound variable is required in the bindings given the script.
@@ -52,10 +51,10 @@ public class SlingBindings extends LazyBindings {
 
     /**
      * The name of the global scripting variable providing the
-     * {@link org.apache.sling.api.SlingHttpServletResponse} object (value is
+     * {@link org.apache.sling.api.SlingJakartaHttpServletResponse} object (value is
      * "response"). The value of the scripting variable is the same as that
      * returned by the
-     * {@link org.apache.sling.api.scripting.SlingScriptHelper#getResponse()}
+     * {@link org.apache.sling.api.scripting.SlingJakartaScriptHelper#getResponse()}
      * method.
      * <p>
      * This bound variable is required in the bindings given the script.
@@ -72,7 +71,7 @@ public class SlingBindings extends LazyBindings {
 
     /**
      * The name of the global scripting variable providing the
-     * {@link org.apache.sling.api.scripting.SlingScriptHelper} for the request
+     * {@link org.apache.sling.api.scripting.SlingJakartaScriptHelper} for the request
      * (value is "sling").
      * <p>
      * This bound variable is optional. If existing, the script helper instance
@@ -87,12 +86,12 @@ public class SlingBindings extends LazyBindings {
      * The name of the global scripting variable providing the
      * {@link org.apache.sling.api.resource.Resource} object (value is
      * "resource"). The value of the scripting variable is the same as that
-     * returned by the <code>SlingScriptHelper.getRequest().getResource()</code>
+     * returned by the <code>SlingJakartaScriptHelper.getRequest().getResource()</code>
      * method.
      * <p>
      * This bound variable is optional. If existing, the resource must be bound
      * to the same resource as returned by the
-     * <code>SlingHttpServletRequest.getResource()</code> method. If this
+     * <code>SlingJakartaHttpServletRequest.getResource()</code> method. If this
      * variable is not bound, the script implementation will bind it before
      * actually evaluating the script.
      */
@@ -103,13 +102,13 @@ public class SlingBindings extends LazyBindings {
      * The name of the global scripting variable providing the
      * {@link org.apache.sling.api.resource.ResourceResolver} object (value is
      * "resolver"). The value of the scripting variable is the same as that
-     * returned by the {@code SlingScriptHelper.getRequest().getResourceResolver()}
+     * returned by the {@code SlingJakartaScriptHelper.getRequest().getResourceResolver()}
      * method.
      * </p>
      * <p>
      * This bound variable is optional. If existing, the resource resolver must be
      * bound to the same resolver as returned by the {@code
-     * SlingHttpServletRequest.getResource().getResourceResolver} method. If this
+     * SlingJakartaHttpServletRequest.getResource().getResourceResolver} method. If this
      * variable is not bound, the script implementation will bind it before actually
      * evaluating the script.
      * </p>
@@ -120,7 +119,7 @@ public class SlingBindings extends LazyBindings {
      * The name of the global scripting variable providing the
      * <code>java.io.PrintWriter</code> object to return the response content
      * (value is "out"). The value of the scripting variable is the same as that
-     * returned by the <code>SlingScriptHelper.getResponse().getWriter()</code>
+     * returned by the <code>SlingJakartaScriptHelper.getResponse().getWriter()</code>
      * method.
      * <p>
      * Note, that it may be advisable to implement a lazy acquiring writer for
@@ -129,7 +128,7 @@ public class SlingBindings extends LazyBindings {
      * <p>
      * This bound variable is optional. If existing, the resource must be bound
      * to the same writer as returned by the
-     * <code>SlingHttpServletResponse.getWriter()</code> method of the
+     * <code>SlingJakartaHttpServletResponse.getWriter()</code> method of the
      * response object bound to the {@link #RESPONSE} variable. If this variable
      * is not bound, the script implementation will bind it before actually
      * evaluating the script.
@@ -251,18 +250,18 @@ public class SlingBindings extends LazyBindings {
      * <code>null</code>.
      * @param request The request object.
      */
-    public void setRequest(SlingHttpServletRequest request) {
+    public void setRequest(SlingJakartaHttpServletRequest request) {
         this.safePut(REQUEST, request);
     }
 
     /**
      * Returns the {@link #REQUEST} property if not <code>null</code> and a
-     * <code>SlingHttpServletRequest</code> instance. Otherwise
+     * <code>SlingJakartaHttpServletRequest</code> instance. Otherwise
      * <code>null</code> is returned.
      * @return The request object or {@code null}
      */
-    public @Nullable SlingHttpServletRequest getRequest() {
-        return this.get(REQUEST, SlingHttpServletRequest.class);
+    public @Nullable SlingJakartaHttpServletRequest getRequest() {
+        return this.get(REQUEST, SlingJakartaHttpServletRequest.class);
     }
 
     /**
@@ -326,18 +325,18 @@ public class SlingBindings extends LazyBindings {
      * <code>null</code>.
      * @param response The response
      */
-    public void setResponse(SlingHttpServletResponse response) {
+    public void setResponse(SlingJakartaHttpServletResponse response) {
         this.safePut(RESPONSE, response);
     }
 
     /**
      * Returns the {@link #RESPONSE} property if not <code>null</code> and a
-     * <code>SlingHttpServletResponse</code> instance. Otherwise
+     * <code>SlingJakartaHttpServletResponse</code> instance. Otherwise
      * <code>null</code> is returned.
      * @return The response or {@code null}.
      */
-    public @Nullable SlingHttpServletResponse getResponse() {
-        return this.get(RESPONSE, SlingHttpServletResponse.class);
+    public @Nullable SlingJakartaHttpServletResponse getResponse() {
+        return this.get(RESPONSE, SlingJakartaHttpServletResponse.class);
     }
 
     /**
@@ -345,17 +344,17 @@ public class SlingBindings extends LazyBindings {
      * <code>null</code>.
      * @param sling The script helper
      */
-    public void setSling(SlingScriptHelper sling) {
+    public void setSling(SlingJakartaScriptHelper sling) {
         this.safePut(SLING, sling);
     }
 
     /**
      * Returns the {@link #SLING} property if not <code>null</code> and a
-     * <code>SlingScriptHelper</code> instance. Otherwise <code>null</code>
+     * <code>SlingJakartaScriptHelper</code> instance. Otherwise <code>null</code>
      * is returned.
      * @return The script helper or {@code null}.
      */
-    public @Nullable SlingScriptHelper getSling() {
-        return this.get(SLING, SlingScriptHelper.class);
+    public @Nullable SlingJakartaScriptHelper getSling() {
+        return this.get(SLING, SlingJakartaScriptHelper.class);
     }
 }
diff --git a/src/main/java/org/apache/sling/api/scripting/SlingScript.java b/src/main/java/org/apache/sling/api/scripting/SlingJakartaScript.java
similarity index 77%
copy from src/main/java/org/apache/sling/api/scripting/SlingScript.java
copy to src/main/java/org/apache/sling/api/scripting/SlingJakartaScript.java
index 08a7041..880e37e 100644
--- a/src/main/java/org/apache/sling/api/scripting/SlingScript.java
+++ b/src/main/java/org/apache/sling/api/scripting/SlingJakartaScript.java
@@ -25,18 +25,19 @@ import org.apache.sling.api.resource.Resource;
 import org.osgi.annotation.versioning.ConsumerType;
 
 /**
- * The <code>SlingScript</code> defines the API for objects which encapsulate
- * a script. To evaluate a script prepare a {@link SlingBindings} instance of
+ * The <code>SlingJakartaScript</code> defines the API for objects which encapsulate
+ * a script. To evaluate a script prepare a {@link SlingJakartaBindings} instance of
  * variables used as global variables to the script and call the
- * {@link #eval(SlingBindings)} method.
+ * {@link #eval(SlingJakartaBindings)} method.
  * <p>
  * You can obtain scripts by resolving a script resource through
  * {@link org.apache.sling.api.resource.ResourceResolver#resolve(String)}
  * and then trying to adapt the resource to a script by
  * calling {@link Resource#adaptTo(Class)}.
+ * @since 2.6.0
  */
 @ConsumerType
-public interface SlingScript {
+public interface SlingJakartaScript {
 
     /**
      * Returns the Resource providing the script source code.
@@ -48,24 +49,24 @@ public interface SlingScript {
      * Evaluates this script using the bound variables as global variables to
      * the script.
      *
-     * @param props The {@link SlingBindings} providing the bound variables for
+     * @param props The {@link SlingJakartaBindings} providing the bound variables for
      *            evaluating the script. Any bound variables must conform to the
-     *            requirements of the {@link SlingBindings} predefined variables
+     *            requirements of the {@link SlingJakartaBindings} predefined variables
      *            set.
      * @return The value returned by the script.
      * @throws ScriptEvaluationException If an error occurs executing the
      *             script or preparing the script execution. The cause of the
      *             evaluation exception is available as the exception cause.
      */
-    Object eval(@NotNull SlingBindings props);
+    Object eval(@NotNull SlingJakartaBindings props);
 
     /**
      * Evaluates this script using the bound variables as global variables to
      * the script and then calls the given method with the arguments.
      *
-     * @param props The {@link SlingBindings} providing the bound variables for
+     * @param props The {@link SlingJakartaBindings} providing the bound variables for
      *            evaluating the script. Any bound variables must conform to the
-     *            requirements of the {@link SlingBindings} predefined variables
+     *            requirements of the {@link SlingJakartaBindings} predefined variables
      *            set.
      * @param method The name of the method to call.
      * @param args The arguments for the method call.
@@ -74,5 +75,5 @@ public interface SlingScript {
      *             script or preparing the script execution. The cause of the
      *             evaluation exception is available as the exception cause.
      */
-    Object call(@NotNull SlingBindings props, @NotNull String method, Object... args);
+    Object call(@NotNull SlingJakartaBindings props, @NotNull String method, Object... args);
 }
diff --git a/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java b/src/main/java/org/apache/sling/api/scripting/SlingJakartaScriptHelper.java
similarity index 95%
copy from src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
copy to src/main/java/org/apache/sling/api/scripting/SlingJakartaScriptHelper.java
index 98b1ef7..1545dc7 100644
--- a/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
+++ b/src/main/java/org/apache/sling/api/scripting/SlingJakartaScriptHelper.java
@@ -20,41 +20,41 @@ package org.apache.sling.api.scripting;
 
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.annotations.NotNull;
-
-import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
 import org.apache.sling.api.request.RequestDispatcherOptions;
 import org.apache.sling.api.resource.Resource;
 
 import org.osgi.annotation.versioning.ProviderType;
 
 /**
- * The <code>SlingScriptHelper</code> interface defines the API of a helper
+ * The <code>SlingJakartaScriptHelper</code> interface defines the API of a helper
  * class which is provided to the scripts called from sling through the global
- * <code>{@link SlingBindings#SLING sling}</code> variable.
+ * <code>{@link SlingJakartaBindings#SLING sling}</code> variable.
+ * @since 2.6.0
  */
 @ProviderType
-public interface SlingScriptHelper {
+public interface SlingJakartaScriptHelper {
 
     /**
-     * Returns the {@link SlingHttpServletRequest} representing the input of the
+     * Returns the {@link SlingJakartaHttpServletRequest} representing the input of the
      * request.
      * @return The request
      */
-    @NotNull SlingHttpServletRequest getRequest();
+    @NotNull SlingJakartaHttpServletRequest getRequest();
 
     /**
-     * Returns the {@link SlingHttpServletResponse} representing the output of
+     * Returns the {@link SlingJakartaHttpServletResponse} representing the output of
      * the request.
      * @return The response
      */
-    @NotNull SlingHttpServletResponse getResponse();
+    @NotNull SlingJakartaHttpServletResponse getResponse();
 
     /**
-     * Returns the {@link SlingScript} being called to handle the request.
+     * Returns the {@link SlingJakartaScriptHelper} being called to handle the request.
      * @return The script
      */
-    @NotNull SlingScript getScript();
+    @NotNull SlingJakartaScript getScript();
 
     /**
      * Same as {@link #include(String,RequestDispatcherOptions)}, but using
diff --git a/src/main/java/org/apache/sling/api/scripting/SlingScript.java b/src/main/java/org/apache/sling/api/scripting/SlingScript.java
index 08a7041..a708dd9 100644
--- a/src/main/java/org/apache/sling/api/scripting/SlingScript.java
+++ b/src/main/java/org/apache/sling/api/scripting/SlingScript.java
@@ -34,7 +34,9 @@ import org.osgi.annotation.versioning.ConsumerType;
  * {@link org.apache.sling.api.resource.ResourceResolver#resolve(String)}
  * and then trying to adapt the resource to a script by
  * calling {@link Resource#adaptTo(Class)}.
+ * @deprecated Use {@link SlingJakartaScript} instead
  */
+@Deprecated
 @ConsumerType
 public interface SlingScript {
 
diff --git a/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java b/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
index 98b1ef7..08191b9 100644
--- a/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
+++ b/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
@@ -32,7 +32,9 @@ import org.osgi.annotation.versioning.ProviderType;
  * The <code>SlingScriptHelper</code> interface defines the API of a helper
  * class which is provided to the scripts called from sling through the global
  * <code>{@link SlingBindings#SLING sling}</code> variable.
+ * @deprecated Use {@link SlingJakartaBindings} instead.
  */
+@Deprecated
 @ProviderType
 public interface SlingScriptHelper {
 
diff --git a/src/main/java/org/apache/sling/api/scripting/package-info.java b/src/main/java/org/apache/sling/api/scripting/package-info.java
index e43eb81..1772977 100644
--- a/src/main/java/org/apache/sling/api/scripting/package-info.java
+++ b/src/main/java/org/apache/sling/api/scripting/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("2.5.0")
+@Version("2.6.0")
 package org.apache.sling.api.scripting;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/servlets/ErrorHandler.java b/src/main/java/org/apache/sling/api/servlets/ErrorHandler.java
index c448739..a8dcf7e 100644
--- a/src/main/java/org/apache/sling/api/servlets/ErrorHandler.java
+++ b/src/main/java/org/apache/sling/api/servlets/ErrorHandler.java
@@ -28,7 +28,9 @@ import org.osgi.annotation.versioning.ConsumerType;
  * The <code>ErrorHandler</code> defines the interface of the service used by
  * the Sling to handle calls to <code>HttpServletResponse.sendError</code> and
  * to handle uncaught <code>Throwable</code>s.
+ * @deprecated Use {@link JakartaErrorHandler} instead.
  */
+@Deprecated
 @ConsumerType
 public interface ErrorHandler {
 
diff --git a/src/main/java/org/apache/sling/api/servlets/ErrorHandler.java b/src/main/java/org/apache/sling/api/servlets/JakartaErrorHandler.java
similarity index 80%
copy from src/main/java/org/apache/sling/api/servlets/ErrorHandler.java
copy to src/main/java/org/apache/sling/api/servlets/JakartaErrorHandler.java
index c448739..86d7df2 100644
--- a/src/main/java/org/apache/sling/api/servlets/ErrorHandler.java
+++ b/src/main/java/org/apache/sling/api/servlets/JakartaErrorHandler.java
@@ -20,17 +20,18 @@ package org.apache.sling.api.servlets;
 
 import java.io.IOException;
 
-import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
 import org.osgi.annotation.versioning.ConsumerType;
 
 /**
- * The <code>ErrorHandler</code> defines the interface of the service used by
- * the Sling to handle calls to <code>HttpServletResponse.sendError</code> and
+ * The <code>JakartaErrorHandler</code> defines the interface of the service used by
+ * the Sling to handle calls to <code>jakarta.servlet.http.HttpServletResponse.sendError</code> and
  * to handle uncaught <code>Throwable</code>s.
+ * @since 2.5
  */
 @ConsumerType
-public interface ErrorHandler {
+public interface JakartaErrorHandler {
 
     /**
      * Called to render a response for a HTTP status code. This method should
@@ -49,7 +50,7 @@ public interface ErrorHandler {
      *             response.
      */
     void handleError(int status, String message,
-            SlingHttpServletRequest request, SlingHttpServletResponse response)
+        SlingJakartaHttpServletRequest request, SlingJakartaHttpServletResponse response)
             throws IOException;
 
     /**
@@ -66,7 +67,7 @@ public interface ErrorHandler {
      * @throws IOException May be thrown if an error occurrs sending the
      *             response.
      */
-    void handleError(Throwable throwable, SlingHttpServletRequest request,
-            SlingHttpServletResponse response) throws IOException;
+    void handleError(Throwable throwable, SlingJakartaHttpServletRequest request,
+        SlingJakartaHttpServletResponse response) throws IOException;
 
 }
diff --git a/src/main/java/org/apache/sling/api/servlets/OptingServlet.java b/src/main/java/org/apache/sling/api/servlets/JakartaOptingServlet.java
similarity index 82%
copy from src/main/java/org/apache/sling/api/servlets/OptingServlet.java
copy to src/main/java/org/apache/sling/api/servlets/JakartaOptingServlet.java
index 4a56d94..bf934e3 100644
--- a/src/main/java/org/apache/sling/api/servlets/OptingServlet.java
+++ b/src/main/java/org/apache/sling/api/servlets/JakartaOptingServlet.java
@@ -18,26 +18,25 @@
  */
 package org.apache.sling.api.servlets;
 
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.jetbrains.annotations.NotNull;
-import javax.servlet.Servlet;
-
-import org.apache.sling.api.SlingHttpServletRequest;
+import jakarta.servlet.Servlet;
 
 import org.osgi.annotation.versioning.ConsumerType;
 
 /**
- * The <code>OptingServlet</code> interface may be implemented by
- * <code>Servlets</code> used by Sling which may choose to not handle all
+ * The <code>JakartaOptingServlet</code> interface may be implemented by
+ * <code>Servlet</code>s used by Sling which may choose to not handle all
  * requests for which they would be selected based on their registration
  * properties.
  *
  * Note that servlets implementing this interface can have an impact
- * on system performance, as their resolution cannot be cached: the 
+ * on system performance, as their resolution cannot be cached: the
  * resolver has no insight into which parts of the request cause
  * {@link #accepts} to return true.
  */
 @ConsumerType
-public interface OptingServlet extends Servlet {
+public interface JakartaOptingServlet extends Servlet {
 
     /**
      * Examines the request, and return <code>true</code> if this servlet is
@@ -49,6 +48,6 @@ public interface OptingServlet extends Servlet {
      * @return <code>true</code> if this servlet will handle the request,
      *         <code>false</code> otherwise
      */
-    boolean accepts(@NotNull SlingHttpServletRequest request);
+    boolean accepts(@NotNull SlingJakartaHttpServletRequest request);
 
 }
diff --git a/src/main/java/org/apache/sling/api/servlets/OptingServlet.java b/src/main/java/org/apache/sling/api/servlets/OptingServlet.java
index 4a56d94..9dad4b1 100644
--- a/src/main/java/org/apache/sling/api/servlets/OptingServlet.java
+++ b/src/main/java/org/apache/sling/api/servlets/OptingServlet.java
@@ -32,10 +32,12 @@ import org.osgi.annotation.versioning.ConsumerType;
  * properties.
  *
  * Note that servlets implementing this interface can have an impact
- * on system performance, as their resolution cannot be cached: the 
+ * on system performance, as their resolution cannot be cached: the
  * resolver has no insight into which parts of the request cause
  * {@link #accepts} to return true.
+ * @deprecated Use {@link JakartaOptingServlet} instead
  */
+@Deprecated
 @ConsumerType
 public interface OptingServlet extends Servlet {
 
diff --git a/src/main/java/org/apache/sling/api/servlets/ServletResolver.java b/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
index 8cb8ae9..e6b7a7f 100644
--- a/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
+++ b/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
@@ -20,9 +20,9 @@ package org.apache.sling.api.servlets;
 
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.annotations.NotNull;
-import javax.servlet.Servlet;
+import jakarta.servlet.Servlet;
 
-import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 
@@ -30,7 +30,7 @@ import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * The <code>ServletResolver</code> defines the API for a service capable of
- * resolving <code>javax.servlet.Servlet</code> instances to handle the
+ * resolving <code>jakarta.servlet.Servlet</code> instances to handle the
  * processing of a request or resource.
  * <p>
  * Applications of the Sling Framework generally do not need the servlet
@@ -40,6 +40,91 @@ import org.osgi.annotation.versioning.ProviderType;
 @ProviderType
 public interface ServletResolver {
 
+    /**
+     * Resolves a <code>jakarta.servlet.Servlet</code> whose
+     * <code>service</code> method may be used to handle the given
+     * <code>request</code>.
+     * <p>
+     * The returned servlet must be assumed to be initialized and ready to run.
+     * That is, the <code>init</code> nor the <code>destroy</code> methods
+     * must <em>NOT</em> be called on the returned servlet.
+     * <p>
+     * This method must not return a <code>Servlet</code> instance
+     * implementing the {@link JakartaOptingServlet} interface and returning
+     * <code>false</code> when the
+     * {@link JakartaOptingServlet#accepts(SlingJakartaHttpServletRequest)} method is called.
+     *
+     * @param request The {@link SlingJakartaHttpServletRequest} object used to drive
+     *            selection of the servlet.
+     * @return The servlet whose <code>service</code> method may be called to
+     *         handle the request. Might be {@code null}.
+     * @throws org.apache.sling.api.SlingException Is thrown if an error occurs
+     *             while trying to find an appropriate servlet to handle the
+     *             request.
+     * @throws NullPointerException If {@code request} is null.
+     * @since 2.5.0
+     */
+    @Nullable Servlet resolve(@NotNull SlingJakartaHttpServletRequest request);
+
+
+    /**
+     * Resolves a <code>jakarta.servlet.Servlet</code> whose
+     * <code>service</code> method may be used to handle a request.
+     * <p>
+     * The returned servlet must be assumed to be initialized and ready to run.
+     * That is, the <code>init</code> nor the <code>destroy</code> methods
+     * must <em>NOT</em> be called on the returned servlet.
+     * <p>
+     * This method skips all {@link OptingServlet}s as there is no
+     * request object available.
+     *
+     * Basically this method searches a script with the <code>scriptName</code>
+     * for the resource type defined by the <code>resource</code>.
+     *
+     * @param resource The {@link Resource} object used to drive
+     *            selection of the servlet.
+     * @param scriptName The name of the script - the script might have an
+     *                   extension. In this case only a script with the
+     *                   matching extension is used.
+     * @return The servlet whose <code>service</code> method may be called to
+     *         handle the request. Might be {@code null}.
+     * @throws org.apache.sling.api.SlingException Is thrown if an error occurs
+     *             while trying to find an appropriate servlet to handle the
+     *             request or if no servlet could be resolved to handle the
+     *             request.
+     * @throws IllegalArgumentException If {@code resource} is null.
+     * @since 2.1 (Sling API Bundle 2.1.0)
+     * @since 2.5.0
+     */
+    @Nullable Servlet resolve(@NotNull Resource resource, @NotNull String scriptName);
+
+    /**
+     * Resolves a <code>jakarta.servlet.Servlet</code> whose
+     * <code>service</code> method may be used to handle a request.
+     * <p>
+     * The returned servlet must be assumed to be initialized and ready to run.
+     * That is, the <code>init</code> nor the <code>destroy</code> methods
+     * must <em>NOT</em> be called on the returned servlet.
+     * <p>
+     * This method skips all {@link OptingServlet}s as there is no
+     * request object available.
+     *
+     * Basically this method searches a script with the <code>scriptName</code>
+     * @param resolver The {@link ResourceResolver} object used to drive
+     *            selection of the servlet.
+     * @param scriptName The name of the script - the script might have an
+     *                   extension. In this case only a script with the
+     *                   matching extension is used.
+     * @return The servlet whose <code>service</code> method may be called to
+     *         handle the request. Might be {@code null}.
+     * @throws org.apache.sling.api.SlingException Is thrown if an error occurs
+     *             while trying to find an appropriate servlet to handle the
+     *             request.
+     * @throws IllegalArgumentException If {@code resolver} is null.
+     * @since 2.5.0
+     */
+    @Nullable Servlet resolve(@NotNull ResourceResolver resolver, @NotNull String scriptName);
+
     /**
      * Resolves a <code>javax.servlet.Servlet</code> whose
      * <code>service</code> method may be used to handle the given
@@ -52,9 +137,9 @@ public interface ServletResolver {
      * This method must not return a <code>Servlet</code> instance
      * implementing the {@link OptingServlet} interface and returning
      * <code>false</code> when the
-     * {@link OptingServlet#accepts(SlingHttpServletRequest)} method is called.
+     * {@link OptingServlet#accepts(org.apache.sling.api.SlingHttpServletRequest)} method is called.
      *
-     * @param request The {@link SlingHttpServletRequest} object used to drive
+     * @param request The {@link org.apache.sling.api.SlingHttpServletRequest} object used to drive
      *            selection of the servlet.
      * @return The servlet whose <code>service</code> method may be called to
      *         handle the request. Might be {@code null}.
@@ -62,8 +147,10 @@ public interface ServletResolver {
      *             while trying to find an appropriate servlet to handle the
      *             request.
      * @throws NullPointerException If {@code request} is null.
+     * @deprecated Use {@link #resolve(SlingJakartaHttpServletRequest)} instead.
      */
-    @Nullable Servlet resolveServlet(@NotNull SlingHttpServletRequest request);
+    @Deprecated
+    @Nullable javax.servlet.Servlet resolveServlet(@NotNull org.apache.sling.api.SlingHttpServletRequest request);
 
     /**
      * Resolves a <code>javax.servlet.Servlet</code> whose
@@ -92,8 +179,10 @@ public interface ServletResolver {
      *             request.
      * @throws IllegalArgumentException If {@code resource} is null.
      * @since 2.1 (Sling API Bundle 2.1.0)
+     * @deprecated Use {@link #resolve(Resource, String)} instead.
      */
-    @Nullable Servlet resolveServlet(@NotNull Resource resource, @NotNull String scriptName);
+    @Deprecated
+    @Nullable javax.servlet.Servlet resolveServlet(@NotNull Resource resource, @NotNull String scriptName);
 
     /**
      * Resolves a <code>javax.servlet.Servlet</code> whose
@@ -119,7 +208,8 @@ public interface ServletResolver {
      *             request.
      * @throws IllegalArgumentException If {@code resolver} is null.
      * @since 2.1 (Sling API Bundle 2.1.0)
+     * @deprecated Use {@link #resolve(ResourceResolver, String)} instead.
      */
-    @Nullable Servlet resolveServlet(@NotNull ResourceResolver resolver, @NotNull String scriptName);
-
+    @Deprecated
+    @Nullable javax.servlet.Servlet resolveServlet(@NotNull ResourceResolver resolver, @NotNull String scriptName);
 }
diff --git a/src/main/java/org/apache/sling/api/servlets/ServletResolverConstants.java b/src/main/java/org/apache/sling/api/servlets/ServletResolverConstants.java
index b1caca6..8e454d2 100644
--- a/src/main/java/org/apache/sling/api/servlets/ServletResolverConstants.java
+++ b/src/main/java/org/apache/sling/api/servlets/ServletResolverConstants.java
@@ -145,7 +145,7 @@ public final class ServletResolverConstants {
      * <code>component.name</code> property or the <code>service.pid</code>
      * is used. If none of the three properties is defined, the Servlet is
      * ignored.
-     * @see javax.servlet.ServletConfig#getServletName()
+     * @see jakarta.servlet.ServletConfig#getServletName()
      */
     public static final String SLING_SERVLET_NAME = "sling.core.servletName";
 
diff --git a/src/main/java/org/apache/sling/api/servlets/SlingAllMethodsServlet.java b/src/main/java/org/apache/sling/api/servlets/SlingAllMethodsServlet.java
index 7666fe9..e6ba8f0 100644
--- a/src/main/java/org/apache/sling/api/servlets/SlingAllMethodsServlet.java
+++ b/src/main/java/org/apache/sling/api/servlets/SlingAllMethodsServlet.java
@@ -38,7 +38,9 @@ import org.apache.sling.api.SlingHttpServletResponse;
  *
  * @see SlingSafeMethodsServlet for more information on supporting more HTTP
  *      methods
+ * @deprecated Use {@link SlingJakartaAllMethodsServlet} instead
  */
+@Deprecated
 public class SlingAllMethodsServlet extends SlingSafeMethodsServlet {
 
     private static final long serialVersionUID = -7960975481323952419L;
diff --git a/src/main/java/org/apache/sling/api/servlets/SlingAllMethodsServlet.java b/src/main/java/org/apache/sling/api/servlets/SlingJakartaAllMethodsServlet.java
similarity index 82%
copy from src/main/java/org/apache/sling/api/servlets/SlingAllMethodsServlet.java
copy to src/main/java/org/apache/sling/api/servlets/SlingJakartaAllMethodsServlet.java
index 7666fe9..56268eb 100644
--- a/src/main/java/org/apache/sling/api/servlets/SlingAllMethodsServlet.java
+++ b/src/main/java/org/apache/sling/api/servlets/SlingJakartaAllMethodsServlet.java
@@ -21,14 +21,14 @@ import java.lang.reflect.Method;
 import java.util.Map;
 
 import org.jetbrains.annotations.NotNull;
-import javax.servlet.ServletException;
+import jakarta.servlet.ServletException;
 
-import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
 
 /**
  * Helper base class for data modifying Servlets used in Sling. This class
- * extends the {@link SlingSafeMethodsServlet} by support for the <em>POST</em>,
+ * extends the {@link SlingJakartaSafeMethodsServlet} by support for the <em>POST</em>,
  * <em>PUT</em> and <em>DELETE</em> methods.
  * <p>
  * Implementors note: The methods in this class are all declared to throw the
@@ -36,16 +36,17 @@ import org.apache.sling.api.SlingHttpServletResponse;
  * throwing their Sling RuntimeException counter parts. This is done to easy the
  * integration with traditional servlets.
  *
- * @see SlingSafeMethodsServlet for more information on supporting more HTTP
+ * @since 2.5.0
+ * @see SlingJakartaSafeMethodsServlet for more information on supporting more HTTP
  *      methods
  */
-public class SlingAllMethodsServlet extends SlingSafeMethodsServlet {
+public class SlingJakartaAllMethodsServlet extends SlingJakartaSafeMethodsServlet {
 
     private static final long serialVersionUID = -7960975481323952419L;
 
     /**
      * Called by the
-     * {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method to
+     * {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method to
      * handle an HTTP <em>POST</em> request.
      * <p>
      * This default implementation reports back to the client that the method is
@@ -60,15 +61,15 @@ public class SlingAllMethodsServlet extends SlingSafeMethodsServlet {
      * @throws IOException If the error status cannot be reported back to the
      *             client.
      */
-    protected void doPost(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void doPost(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
         handleMethodNotImplemented(request, response);
     }
 
     /**
      * Called by the
-     * {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method to
+     * {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method to
      * handle an HTTP <em>PUT</em> request.
      * <p>
      * This default implementation reports back to the client that the method is
@@ -83,15 +84,15 @@ public class SlingAllMethodsServlet extends SlingSafeMethodsServlet {
      * @throws IOException If the error status cannot be reported back to the
      *             client.
      */
-    protected void doPut(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void doPut(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
         handleMethodNotImplemented(request, response);
     }
 
     /**
      * Called by the
-     * {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method to
+     * {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method to
      * handle an HTTP <em>DELETE</em> request.
      * <p>
      * This default implementation reports back to the client that the method is
@@ -106,8 +107,8 @@ public class SlingAllMethodsServlet extends SlingSafeMethodsServlet {
      * @throws IOException If the error status cannot be reported back to the
      *             client.
      */
-    protected void doDelete(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void doDelete(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
         handleMethodNotImplemented(request, response);
     }
@@ -129,8 +130,8 @@ public class SlingAllMethodsServlet extends SlingSafeMethodsServlet {
      * @throws ServletException Forwarded from any of the dispatched methods
      * @throws IOException Forwarded from any of the dispatched methods
      */
-    protected boolean mayService(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected boolean mayService(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
 
         // assume the method is known for now
@@ -159,7 +160,7 @@ public class SlingAllMethodsServlet extends SlingSafeMethodsServlet {
 
     /**
      * Helper method called by
-     * {@link #doOptions(SlingHttpServletRequest, SlingHttpServletResponse)} to calculate
+     * {@link #doOptions(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} to calculate
      * the value of the <em>Allow</em> header sent as the response to the HTTP
      * <em>OPTIONS</em> request.
      * <p>
@@ -178,7 +179,7 @@ public class SlingAllMethodsServlet extends SlingSafeMethodsServlet {
         StringBuffer allowBuf = super.getAllowedRequestMethods(declaredMethods);
 
         // add more method names depending on the methods found
-        String className = SlingAllMethodsServlet.class.getName();
+        String className = SlingJakartaAllMethodsServlet.class.getName();
         if (isMethodValid(declaredMethods.get("doPost"), className)) {
             allowBuf.append(", ").append(HttpConstants.METHOD_POST);
 
diff --git a/src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java b/src/main/java/org/apache/sling/api/servlets/SlingJakartaSafeMethodsServlet.java
similarity index 80%
copy from src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java
copy to src/main/java/org/apache/sling/api/servlets/SlingJakartaSafeMethodsServlet.java
index 1d25ce9..14a0380 100644
--- a/src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java
+++ b/src/main/java/org/apache/sling/api/servlets/SlingJakartaSafeMethodsServlet.java
@@ -26,18 +26,18 @@ import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
+import org.apache.sling.api.wrappers.SlingJakartaHttpServletResponseWrapper;
 import org.jetbrains.annotations.NotNull;
-import javax.servlet.GenericServlet;
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.WriteListener;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.SlingHttpServletResponse;
-import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper;
+import jakarta.servlet.GenericServlet;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.WriteListener;
+import jakarta.servlet.http.HttpServletResponse;
+
 
 /**
  * Helper base class for read-only Servlets used in Sling. This base class is
@@ -48,7 +48,7 @@ import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper;
  * If any of the default HTTP methods is to be implemented just overwrite the
  * respective doXXX method. If additional methods should be supported implement
  * appropriate doXXX methods and overwrite the
- * {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method
+ * {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method
  * to dispatch to the doXXX methods as appropriate and overwrite the
  * {@link #getAllowedRequestMethods(Map)} to add the new method names.
  * <p>
@@ -57,7 +57,7 @@ import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper;
  * <em>PUT</em> and <em>DELETE</em> methods. Extensions of this class should
  * either overwrite any of the doXXX methods of this class or add support for
  * other read-only methods only. Applications wishing to support data
- * modification should rather use or extend the {@link SlingAllMethodsServlet}
+ * modification should rather use or extend the {@link SlingJakartaAllMethodsServlet}
  * which also contains support for the <em>POST</em>, <em>PUT</em> and
  * <em>DELETE</em> methods. This latter class should also be overwritten to
  * add support for HTTP methods modifying data.
@@ -67,9 +67,10 @@ import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper;
  * throwing their Sling RuntimeException counter parts. This is done to ease the
  * integration with traditional servlets.
  *
- * @see SlingAllMethodsServlet
+ * @since 2.5.0
+ * @see SlingJakartaAllMethodsServlet
  */
-public class SlingSafeMethodsServlet extends GenericServlet {
+public class SlingJakartaSafeMethodsServlet extends GenericServlet {
 
     private static final long serialVersionUID = 3620512288346703072L;
 
@@ -77,7 +78,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * Handles the <em>HEAD</em> method.
      * <p>
      * This base implementation just calls the
-     * {@link #doGet(SlingHttpServletRequest, SlingHttpServletResponse)} method dropping
+     * {@link #doGet(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method dropping
      * the output. Implementations of this class may overwrite this method if
      * they have a more performing implementation. Otherwise, they may just keep
      * this base implementation.
@@ -85,14 +86,14 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * @param request The HTTP request
      * @param response The HTTP response which only gets the headers set
      * @throws ServletException Forwarded from the
-     *             {@link #doGet(SlingHttpServletRequest, SlingHttpServletResponse)}
+     *             {@link #doGet(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      *             method called by this implementation.
      * @throws IOException Forwarded from the
-     *             {@link #doGet(SlingHttpServletRequest, SlingHttpServletResponse)}
+     *             {@link #doGet(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      *             method called by this implementation.
      */
-    protected void doHead(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void doHead(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
 
         // the null-output wrapper
@@ -107,7 +108,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
 
     /**
      * Called by the
-     * {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method to
+     * {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method to
      * handle an HTTP <em>GET</em> request.
      * <p>
      * This default implementation reports back to the client that the method is
@@ -122,8 +123,8 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * @throws IOException If the error status cannot be reported back to the
      *             client.
      */
-    protected void doGet(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void doGet(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
         handleMethodNotImplemented(request, response);
     }
@@ -146,8 +147,8 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * @throws ServletException Not thrown by this implementation.
      * @throws IOException Not thrown by this implementation.
      */
-    protected void doOptions(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void doOptions(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
         Map<String, Method> methods = getAllDeclaredMethods(getClass());
         StringBuffer allowBuf = getAllowedRequestMethods(methods);
@@ -168,8 +169,8 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * @throws IOException May be thrown if there is an problem sending back the
      *             request headers in the response stream.
      */
-    protected void doTrace(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void doTrace(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
 
         String CRLF = "\r\n";
@@ -205,7 +206,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
     }
 
     /**
-     * Called by the {@link #service(SlingHttpServletRequest, SlingHttpServletResponse)}
+     * Called by the {@link #service(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      * method to handle a request for an HTTP method, which is not known and
      * handled by this class or its extension.
      * <p>
@@ -214,7 +215,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * <p>
      * This method should be overwritten with great care. It is better to
      * overwrite the
-     * {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method and
+     * {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method and
      * add support for any extension HTTP methods through an additional doXXX
      * method.
      *
@@ -224,8 +225,8 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * @throws IOException If the error status cannot be reported back to the
      *             client.
      */
-    protected void doGeneric(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void doGeneric(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
         handleMethodNotImplemented(request, response);
     }
@@ -252,8 +253,8 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * @throws ServletException Forwarded from any of the dispatched methods
      * @throws IOException Forwarded from any of the dispatched methods
      */
-    protected boolean mayService(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected boolean mayService(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
 
         // assume the method is known for now
@@ -288,8 +289,8 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * @param response The HTTP response to which the error status is sent.
      * @throws IOException Thrown if the status cannot be sent to the client.
      */
-    protected void handleMethodNotImplemented(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws IOException {
+    protected void handleMethodNotImplemented(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws IOException {
         String protocol = request.getProtocol();
         String msg = "Method " + request.getMethod() + " not supported";
 
@@ -309,33 +310,33 @@ public class SlingSafeMethodsServlet extends GenericServlet {
     /**
      * Called by the {@link #service(ServletRequest, ServletResponse)} method to
      * handle the HTTP request. This implementation calls the
-     * {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method and
+     * {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method and
      * depedending on its return value call the
-     * {@link #doGeneric(SlingHttpServletRequest, SlingHttpServletResponse)} method. If
-     * the {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method
+     * {@link #doGeneric(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method. If
+     * the {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method
      * can handle the request, the
-     * {@link #doGeneric(SlingHttpServletRequest, SlingHttpServletResponse)} method is not
+     * {@link #doGeneric(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method is not
      * called otherwise it is called.
      * <p>
      * Implementations of this class should not generally overwrite this method.
-     * Rather the {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)}
+     * Rather the {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      * method should be overwritten to add support for more HTTP methods.
      *
      * @param request The HTTP request
      * @param response The HTTP response
      * @throws ServletException Forwarded from the
-     *             {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)}
+     *             {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      *             or
-     *             {@link #doGeneric(SlingHttpServletRequest, SlingHttpServletResponse)}
+     *             {@link #doGeneric(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      *             methods.
      * @throws IOException Forwarded from the
-     *             {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)}
+     *             {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      *             or
-     *             {@link #doGeneric(SlingHttpServletRequest, SlingHttpServletResponse)}
+     *             {@link #doGeneric(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      *             methods.
      */
-    protected void service(@NotNull SlingHttpServletRequest request,
-            @NotNull SlingHttpServletResponse response) throws ServletException,
+    protected void service(@NotNull SlingJakartaHttpServletRequest request,
+            @NotNull SlingJakartaHttpServletResponse response) throws ServletException,
             IOException {
 
         // first try to handle the request by the known methods
@@ -349,7 +350,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
 
     /**
      * Forwards the request to the
-     * {@link #service(SlingHttpServletRequest, SlingHttpServletResponse)}
+     * {@link #service(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      * method if the request is a HTTP request.
      * <p>
      * Implementations of this class will not generally overwrite this method.
@@ -358,21 +359,21 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * @param res The Servlet response
      * @throws ServletException If the request is not a HTTP request or
      *             forwarded from the
-     *             {@link #service(SlingHttpServletRequest, SlingHttpServletResponse)}
+     *             {@link #service(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      *             called.
      * @throws IOException Forwarded from the
-     *             {@link #service(SlingHttpServletRequest, SlingHttpServletResponse)}
+     *             {@link #service(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)}
      *             called.
      */
     @Override
     public void service(@NotNull ServletRequest req, @NotNull ServletResponse res)
             throws ServletException, IOException {
 
-        if ((req instanceof SlingHttpServletRequest)
-            && (res instanceof SlingHttpServletResponse)) {
+        if ((req instanceof SlingJakartaHttpServletRequest)
+            && (res instanceof SlingJakartaHttpServletResponse)) {
 
-            service((SlingHttpServletRequest) req,
-                (SlingHttpServletResponse) res);
+            service((SlingJakartaHttpServletRequest) req,
+                (SlingJakartaHttpServletResponse) res);
 
         } else {
 
@@ -392,7 +393,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
 
     /**
      * Helper method called by
-     * {@link #doOptions(SlingHttpServletRequest, SlingHttpServletResponse)} to calculate
+     * {@link #doOptions(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} to calculate
      * the value of the <em>Allow</em> header sent as the response to the HTTP
      * <em>OPTIONS</em> request.
      * <p>
@@ -403,7 +404,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * <p>
      * Implementations of this class may overwrite this method check for more
      * methods supported by the extension (generally the same list as used in
-     * the {@link #mayService(SlingHttpServletRequest, SlingHttpServletResponse)} method).
+     * the {@link #mayService(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method).
      * This base class implementation should always be called to make sure the
      * default HTTP methods are included in the list.
      *
@@ -437,7 +438,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
     /**
      * Returns a map of methods declared by the class indexed by method name.
      * This method is called by the
-     * {@link #doOptions(SlingHttpServletRequest, SlingHttpServletResponse)} method to
+     * {@link #doOptions(SlingJakartaHttpServletRequest, SlingJakartaHttpServletResponse)} method to
      * find the methods to be checked by the
      * {@link #getAllowedRequestMethods(Map)} method. Note, that only extension
      * classes of this class are considered to be sure to not account for the
@@ -449,7 +450,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
     private Map<String, Method> getAllDeclaredMethods(Class<?> c) {
         // stop (and do not include) the AbstractSlingServletClass
         if (c == null
-            || c.getName().equals(SlingSafeMethodsServlet.class.getName())) {
+            || c.getName().equals(SlingJakartaSafeMethodsServlet.class.getName())) {
             return new HashMap<String, Method>();
         }
 
@@ -474,7 +475,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
      * just swallows that body, counting the bytes in order to set the content
      * length appropriately.
      */
-    private class NoBodyResponse extends SlingHttpServletResponseWrapper {
+    private class NoBodyResponse extends SlingJakartaHttpServletResponseWrapper {
 
         /** The byte sink and counter */
         private NoBodyOutputStream noBody;
@@ -485,7 +486,7 @@ public class SlingSafeMethodsServlet extends GenericServlet {
         /** Whether the request processor set the content length itself or not. */
         private boolean didSetContentLength;
 
-        NoBodyResponse(SlingHttpServletResponse wrappedResponse) {
+        NoBodyResponse(SlingJakartaHttpServletResponse wrappedResponse) {
             super(wrappedResponse);
             noBody = new NoBodyOutputStream();
         }
@@ -576,5 +577,4 @@ public class SlingSafeMethodsServlet extends GenericServlet {
             // nothing to do
         }
     }
-
 }
diff --git a/src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java b/src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java
index 1d25ce9..e8f8e38 100644
--- a/src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java
+++ b/src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java
@@ -68,7 +68,9 @@ import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper;
  * integration with traditional servlets.
  *
  * @see SlingAllMethodsServlet
+ * @deprecated Use {@link SlingJakartaSafeMethodsServlet} instead
  */
+@Deprecated
 public class SlingSafeMethodsServlet extends GenericServlet {
 
     private static final long serialVersionUID = 3620512288346703072L;
diff --git a/src/main/java/org/apache/sling/api/servlets/package-info.java b/src/main/java/org/apache/sling/api/servlets/package-info.java
index 9c31c3e..45fde49 100644
--- a/src/main/java/org/apache/sling/api/servlets/package-info.java
+++ b/src/main/java/org/apache/sling/api/servlets/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("2.4.0")
+@Version("2.5.0")
 package org.apache.sling.api.servlets;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/uri/SlingUriBuilder.java b/src/main/java/org/apache/sling/api/uri/SlingUriBuilder.java
index 4db50e4..b342e4a 100644
--- a/src/main/java/org/apache/sling/api/uri/SlingUriBuilder.java
+++ b/src/main/java/org/apache/sling/api/uri/SlingUriBuilder.java
@@ -34,7 +34,7 @@ import java.util.NoSuchElementException;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.apache.sling.api.request.RequestPathInfo;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
@@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
  * Builder for immutable {@link SlingUri}s.
  * <p>
  * Example:
- * 
+ *
  * <pre>
  * SlingUri testUri = SlingUriBuilder.create()
  *         .setResourcePath("/test/to/path")
@@ -58,8 +58,7 @@ import org.slf4j.LoggerFactory;
  *         .setQuery("par1=val1&amp;par2=val2")
  *         .build();
  * </pre>
- * <p>
- * 
+ *
  * @since 1.0.0 (Sling API Bundle 2.23.0)
  */
 @ProviderType
@@ -88,7 +87,7 @@ public class SlingUriBuilder {
 
     /**
      * Creates a builder without any URI parameters set.
-     * 
+     *
      * @return a SlingUriBuilder
      */
     @NotNull
@@ -98,7 +97,7 @@ public class SlingUriBuilder {
 
     /**
      * Creates a builder from another SlingUri (clone and modify use case).
-     * 
+     *
      * @param slingUri the Sling URI to clone
      * @return a SlingUriBuilder
      */
@@ -124,7 +123,7 @@ public class SlingUriBuilder {
 
     /**
      * Creates a builder from a resource (only taking the resource path into account).
-     * 
+     *
      * @param resource the resource to take the resource path from
      * @return a SlingUriBuilder
      */
@@ -137,7 +136,7 @@ public class SlingUriBuilder {
 
     /**
      * Creates a builder from a RequestPathInfo instance .
-     * 
+     *
      * @param requestPathInfo the request path info to take resource path, selectors, extension and suffix from.
      * @return a SlingUriBuilder
      */
@@ -154,12 +153,49 @@ public class SlingUriBuilder {
 
     /**
      * Creates a builder from a request.
-     * 
+     *
+     * @param request request to take the URI information from
+     * @return a SlingUriBuilder
+     * @deprecated Use {@link #createFrom(SlingJakartaHttpServletRequest)} instead.
+     */
+    @Deprecated
+    @NotNull
+    public static SlingUriBuilder createFrom(@NotNull org.apache.sling.api.SlingHttpServletRequest request) {
+        @NotNull
+        ResourceResolver resourceResolver = request.getResourceResolver();
+        @NotNull
+        SlingUriBuilder uriBuilder = createFrom(request.getRequestPathInfo())
+                .setResourceResolver(resourceResolver)
+                .setScheme(request.getScheme())
+                .setHost(request.getServerName())
+                .setPort(request.getServerPort())
+                .setQuery(request.getQueryString());
+
+        // SLING-11347 - check if the original request was using a mapped path
+        @Nullable
+        String resourcePath = uriBuilder.getResourcePath();
+        if (resourcePath != null) {
+            @NotNull
+            String mappedResourcePath = resourceResolver.map(request, resourcePath);
+            if (!resourcePath.equals(mappedResourcePath) &&
+                    request.getPathInfo().startsWith(mappedResourcePath)) {
+                // mapped path is different from the resource path and
+                // the request path was the mapped path, so switch to it
+                uriBuilder.setResourcePath(mappedResourcePath);
+            }
+        }
+        return uriBuilder;
+    }
+
+    /**
+     * Creates a builder from a request.
+     *
      * @param request request to take the URI information from
      * @return a SlingUriBuilder
+     * @since 1.4.0
      */
     @NotNull
-    public static SlingUriBuilder createFrom(@NotNull SlingHttpServletRequest request) {
+    public static SlingUriBuilder createFrom(@NotNull SlingJakartaHttpServletRequest request) {
         @NotNull
         ResourceResolver resourceResolver = request.getResourceResolver();
         @NotNull
@@ -188,7 +224,7 @@ public class SlingUriBuilder {
 
     /**
      * Creates a builder from an arbitrary URI.
-     * 
+     *
      * @param uri the uri to transform to a SlingUri
      * @param resourceResolver a resource resolver is needed to decide up to what part the path is the resource path (that decision is only
      *        possible by checking against the underlying repository). If null is passed in, the shortest viable resource path is used.
@@ -218,7 +254,7 @@ public class SlingUriBuilder {
 
     /**
      * Creates a builder from an arbitrary URI string.
-     * 
+     *
      * @param uriStr to uri string to parse
      * @param resourceResolver a resource resolver is needed to decide up to what part the path is the resource path (that decision is only
      *        possible by checking against the underlying repository). If null is passed in, the shortest viable resource path is used.
@@ -307,7 +343,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the user info of the URI.
-     * 
+     *
      * @param userInfo the user info
      * @return the builder for method chaining
      */
@@ -322,7 +358,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the host of the URI.
-     * 
+     *
      * @param host the host
      * @return the builder for method chaining
      */
@@ -337,7 +373,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the port of the URI.
-     * 
+     *
      * @param port the port
      * @return the builder for method chaining
      */
@@ -353,7 +389,7 @@ public class SlingUriBuilder {
     /**
      * Set the path of the URI that contains a resource path and optionally path parameters, selectors, an extension and a suffix. To remove
      * an existing path set path to {@code null}.
-     * 
+     *
      * @param path the path
      * @return the builder for method chaining
      */
@@ -390,7 +426,7 @@ public class SlingUriBuilder {
      * <p>
      * A resource resolver is necessary for this operation, hence
      * {@link #setResourceResolver(ResourceResolver)} needs to be called before {@link #rebaseResourcePath()} or a create method that implicitly sets this has to be used.
-     * 
+     *
      * @return the builder for method chaining
      * @throws IllegalStateException
      *             if no resource resolver is available
@@ -433,7 +469,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the resource path of the URI.
-     * 
+     *
      * @param resourcePath the resource path
      * @return the builder for method chaining
      */
@@ -466,7 +502,7 @@ public class SlingUriBuilder {
 
     /**
      * Add a selector to the URI.
-     * 
+     *
      * @param selector the selector to add
      * @return the builder for method chaining
      */
@@ -497,7 +533,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the extension of the URI.
-     * 
+     *
      * @param extension the extension
      * @return the builder for method chaining
      */
@@ -512,7 +548,7 @@ public class SlingUriBuilder {
 
     /**
      * Set a path parameter to the URI.
-     * 
+     *
      * @param key the path parameter key
      * @param value the path parameter value
      * @return the builder for method chaining
@@ -528,7 +564,7 @@ public class SlingUriBuilder {
 
     /**
      * Replaces all path parameters in the URI.
-     * 
+     *
      * @param pathParameters the path parameters
      * @return the builder for method chaining
      */
@@ -541,7 +577,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the suffix of the URI.
-     * 
+     *
      * @param suffix the suffix
      * @return the builder for method chaining
      */
@@ -559,7 +595,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the query of the URI.
-     * 
+     *
      * @param query the query
      * @return the builder for method chaining
      */
@@ -574,7 +610,7 @@ public class SlingUriBuilder {
 
     /**
      * Add a query parameter to the query of the URI. Key and value are URL-encoded before adding the parameter to the query string.
-     * 
+     *
      * @param parameterName the parameter name
      * @param value the parameter value
      * @return the builder for method chaining
@@ -601,7 +637,7 @@ public class SlingUriBuilder {
      * <p>
      * For adding multiple query parameters with the same name prefer to use {@link #addQueryParameter(String, String)}.
      * </p>
-     * 
+     *
      * @param queryParameters the map with the query parameters
      * @return the builder for method chaining
      */
@@ -619,7 +655,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the fragment of the URI.
-     * 
+     *
      * @param fragment the fragment
      * @return the builder for method chaining
      */
@@ -631,7 +667,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the scheme of the URI.
-     * 
+     *
      * @param scheme the scheme
      * @return the builder for method chaining
      */
@@ -643,7 +679,7 @@ public class SlingUriBuilder {
 
     /**
      * Set the scheme specific part of the URI. Use this for e.g. mail:jon@example.com URIs.
-     * 
+     *
      * @param schemeSpecificPart the scheme specific part
      * @return the builder for method chaining
      */
@@ -655,7 +691,7 @@ public class SlingUriBuilder {
 
     /**
      * Will remove scheme and authority (that is user info, host and port).
-     * 
+     *
      * @return the builder for method chaining
      */
     @NotNull
@@ -669,7 +705,7 @@ public class SlingUriBuilder {
 
     /**
      * Will take over scheme and authority (user info, host and port) from provided slingUri.
-     * 
+     *
      * @param slingUri the Sling URI
      * @return the builder for method chaining
      */
@@ -684,7 +720,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the resource path.
-     * 
+     *
      * @return returns the resource path or null if the URI does not contain a path.
      */
     @Nullable
@@ -694,7 +730,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the selector string
-     * 
+     *
      * @return returns the selector string or null if the URI does not contain selector(s) (in line with {@link RequestPathInfo})
      */
     @Nullable
@@ -704,7 +740,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the selectors array.
-     * 
+     *
      * @return the selectors array (empty if the URI does not contain selector(s), never null)
      */
     @NotNull
@@ -714,7 +750,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the extension.
-     * 
+     *
      * @return the extension or null if the URI does not contain an extension
      */
     @Nullable
@@ -724,7 +760,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the path parameters.
-     * 
+     *
      * @return the path parameters or an empty Map if the URI does not contain any
      */
     @Nullable
@@ -734,7 +770,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the suffix part of the URI
-     * 
+     *
      * @return the suffix string or null if the URI does not contain a suffix
      */
     @Nullable
@@ -749,7 +785,7 @@ public class SlingUriBuilder {
      * <li>the URI does not contain a suffix</li>
      * <li>if the suffix resource could not be found</li>
      * </ul>
-     * 
+     *
      * @return the suffix resource if available or null
      */
     @Nullable
@@ -763,7 +799,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the joint path of resource path, selectors, extension and suffix.
-     * 
+     *
      * @return the path or null if no path is set
      */
     @Nullable
@@ -773,7 +809,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the scheme-specific part of the URI, compare with Javadoc of {@link URI}.
-     * 
+     *
      * @return scheme specific part of the URI
      */
     @Nullable
@@ -787,7 +823,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the query.
-     * 
+     *
      * @return the query part of the URI or null if the URI does not contain a query
      */
     @Nullable
@@ -797,7 +833,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the fragment.
-     * 
+     *
      * @return the fragment or null if the URI does not contain a fragment
      */
     @Nullable
@@ -807,7 +843,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the scheme.
-     * 
+     *
      * @return the scheme or null if not set
      */
     @Nullable
@@ -817,7 +853,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the host.
-     * 
+     *
      * @return returns the host of the SlingUri or null if not set
      */
     @Nullable
@@ -827,7 +863,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the port.
-     * 
+     *
      * @return returns the port of the SlingUri or -1 if not set
      */
     public int getPort() {
@@ -836,7 +872,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns the user info.
-     * 
+     *
      * @return the user info of the SlingUri or null if not set
      */
     @Nullable
@@ -846,7 +882,7 @@ public class SlingUriBuilder {
 
     /**
      * Will take over scheme and authority (user info, host and port) from provided URI.
-     * 
+     *
      * @param uri the URI
      * @return the builder for method chaining
      */
@@ -858,7 +894,7 @@ public class SlingUriBuilder {
 
     /**
      * Sets the resource resolver (required for {@link RequestPathInfo#getSuffixResource()}).
-     * 
+     *
      * @param resourceResolver the resource resolver
      * @return the builder for method chaining
      */
@@ -869,7 +905,7 @@ public class SlingUriBuilder {
     }
 
     /** Builds the immutable SlingUri from this builder.
-     * 
+     *
      * @return the builder for method chaining */
     @NotNull
     public SlingUri build() {
@@ -882,7 +918,7 @@ public class SlingUriBuilder {
 
     /**
      * Builds the corresponding string URI for this builder.
-     * 
+     *
      * @return string representation of builder
      */
     public String toString() {
@@ -891,7 +927,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns true the URI is either a relative or absolute path (this is the case if scheme and host is empty and the URI path is set)
-     * 
+     *
      * @return returns true for path URIs
      */
     public boolean isPath() {
@@ -902,7 +938,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns true if the URI has an absolute path starting with a slash ('/').
-     * 
+     *
      * @return true if the URI is an absolute path
      */
     public boolean isAbsolutePath() {
@@ -911,7 +947,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns true if the URI is a relative path (no scheme and path does not start with '/').
-     * 
+     *
      * @return true if URI is a relative path
      */
     public boolean isRelativePath() {
@@ -920,7 +956,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns true the URI is an absolute URI.
-     * 
+     *
      * @return true if the URI is an absolute URI containing a scheme.
      */
     public boolean isAbsolute() {
@@ -929,7 +965,7 @@ public class SlingUriBuilder {
 
     /**
      * Returns true for opaque URIs like e.g. mailto:jon@example.com.
-     * 
+     *
      * @return true if the URI is an opaque URI
      */
     public boolean isOpaque() {
@@ -938,7 +974,7 @@ public class SlingUriBuilder {
 
     private String toStringInternal(boolean includeScheme, boolean includeFragment) {
         StringBuilder requestUri = new StringBuilder();
-        
+
         if (includeScheme && isAbsolute()) {
             requestUri.append(scheme + CHAR_COLON);
         }
diff --git a/src/main/java/org/apache/sling/api/uri/package-info.java b/src/main/java/org/apache/sling/api/uri/package-info.java
index 8c68894..06d95ce 100644
--- a/src/main/java/org/apache/sling/api/uri/package-info.java
+++ b/src/main/java/org/apache/sling/api/uri/package-info.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-@Version("1.3.1")
+@Version("1.4.0")
 package org.apache.sling.api.uri;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxFilterWrapper.java b/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxFilterWrapper.java
new file mode 100644
index 0000000..042845e
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxFilterWrapper.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.wrappers;
+
+import java.io.IOException;
+
+import org.apache.felix.http.jakartawrappers.FilterConfigWrapper;
+import org.apache.felix.http.javaxwrappers.ServletExceptionUtil;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+/**
+ * This class wraps a filter based on the Jakarta Servlet API
+ * to implement Servlet API 3.
+ * @since 2.9.0
+ */
+public class JakartaToJavaxFilterWrapper implements Filter {
+
+    /**
+     * Create a wrapper
+     * @param filter The filter to wrap
+     * @return The wrapped filter
+     */
+    public static @Nullable Filter toJavaxFilter(final @Nullable jakarta.servlet.Filter filter) {
+        if (filter != null) {
+            return new JakartaToJavaxFilterWrapper(filter);
+        }
+        return null;
+    }
+
+    private final jakarta.servlet.Filter filter;
+
+    public JakartaToJavaxFilterWrapper(final jakarta.servlet.Filter filter) {
+         this.filter = filter;
+    }
+
+    @Override
+    public void init(final FilterConfig config) throws ServletException {
+        try {
+            this.filter.init(new FilterConfigWrapper(config));
+        } catch (final jakarta.servlet.ServletException e) {
+            throw ServletExceptionUtil.getServletException(e);
+        }
+    }
+
+    @Override
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
+            throws IOException, ServletException {
+        try {
+            this.filter.doFilter(JavaxToJakartaRequestWrapper.toJakartaRequest(request),
+                JavaxToJakartaResponseWrapper.toJakartaResponse(response),
+                new FilterChainWrapper(chain));
+        } catch (final jakarta.servlet.ServletException e) {
+            throw ServletExceptionUtil.getServletException(e);
+        }
+    }
+
+    @Override
+    public void destroy() {
+        this.filter.destroy();
+    }
+
+    public static class FilterChainWrapper implements jakarta.servlet.FilterChain{
+
+        private final FilterChain filterChain;
+
+        public FilterChainWrapper(@NotNull final FilterChain chain) {
+            this.filterChain = chain;
+        }
+
+        @Override
+        public void doFilter(final jakarta.servlet.ServletRequest request, final jakarta.servlet.ServletResponse response)
+                throws IOException, jakarta.servlet.ServletException {
+            try {
+                this.filterChain.doFilter(JakartaToJavaxRequestWrapper.toJavaxRequest(request), JakartaToJavaxResponseWrapper.toJavaxResponse(response));
+            } catch (final javax.servlet.ServletException e) {
+                throw org.apache.felix.http.jakartawrappers.ServletExceptionUtil.getServletException(e);
+            }
+        }
+    }
+}
+
diff --git a/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxRequestWrapper.java b/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxRequestWrapper.java
new file mode 100644
index 0000000..2d6594a
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxRequestWrapper.java
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.wrappers;
+
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.felix.http.javaxwrappers.CookieWrapper;
+import org.apache.felix.http.javaxwrappers.HttpServletRequestWrapper;
+import org.apache.felix.http.javaxwrappers.RequestDispatcherWrapper;
+import org.apache.felix.http.javaxwrappers.ServletRequestWrapper;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.request.RequestDispatcherOptions;
+import org.apache.sling.api.request.RequestParameter;
+import org.apache.sling.api.request.RequestParameterMap;
+import org.apache.sling.api.request.RequestPathInfo;
+import org.apache.sling.api.request.RequestProgressTracker;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.http.Cookie;
+
+/**
+ * Wrapper for {@link SlingJakartaHttpServletRequest} to adapt it to the Javax Servlet API.
+ * @since 2.9.0
+ */
+@SuppressWarnings("deprecation")
+public class JakartaToJavaxRequestWrapper
+    extends HttpServletRequestWrapper
+    implements SlingHttpServletRequest {
+
+    /**
+     * Create a new wrapper
+     * @param request Jakarta Servlet API based request object
+     * @return The wrapped request
+     */
+    public static javax.servlet.ServletRequest toJavaxRequest(final ServletRequest request) {
+        if (request instanceof JavaxToJakartaRequestWrapper) {
+            return ((JavaxToJakartaRequestWrapper)request).getRequest();
+        }
+        if (request instanceof SlingJakartaHttpServletRequest) {
+            return new JakartaToJavaxRequestWrapper((SlingJakartaHttpServletRequest)request);
+        }
+        if (request instanceof HttpServletRequest) {
+            return new HttpServletRequestWrapper((HttpServletRequest)request);
+        }
+        return new ServletRequestWrapper(request);
+    }
+
+    public static javax.servlet.http.HttpServletRequest toJavaxRequest(final HttpServletRequest request) {
+        return (javax.servlet.http.HttpServletRequest)toJavaxRequest((ServletRequest)request);
+    }
+
+    public static SlingHttpServletRequest toJavaxRequest(final SlingJakartaHttpServletRequest request) {
+        return (SlingHttpServletRequest)toJavaxRequest((ServletRequest)request);
+    }
+
+    private final SlingJakartaHttpServletRequest wrappedRequest;
+
+    public JakartaToJavaxRequestWrapper(final SlingJakartaHttpServletRequest wrappedRequest) {
+        super(wrappedRequest);
+        this.wrappedRequest = wrappedRequest;
+    }
+
+    @Override
+    public @Nullable Cookie getCookie(final String name) {
+        final jakarta.servlet.http.Cookie cookie = this.wrappedRequest.getCookie(name);
+        if (cookie != null) {
+            return new CookieWrapper(cookie);
+        }
+        return null;
+    }
+
+    @Override
+    public @Nullable RequestDispatcher getRequestDispatcher(@NotNull final String path, final RequestDispatcherOptions options) {
+        final jakarta.servlet.RequestDispatcher dispatcher = this.wrappedRequest.getRequestDispatcher(path, options);
+        if (dispatcher != null) {
+            return new RequestDispatcherWrapper(dispatcher);
+        }
+        return null;
+    }
+
+    @Override
+    public @Nullable RequestDispatcher getRequestDispatcher(@NotNull final Resource resource,
+            RequestDispatcherOptions options) {
+                final jakarta.servlet.RequestDispatcher dispatcher = this.wrappedRequest.getRequestDispatcher(resource, options);
+                if (dispatcher != null) {
+                    return new RequestDispatcherWrapper(dispatcher);
+                }
+                return null;
+            }
+
+    @Override
+    public @Nullable RequestDispatcher getRequestDispatcher(@NotNull final Resource resource) {
+        final jakarta.servlet.RequestDispatcher dispatcher = this.wrappedRequest.getRequestDispatcher(resource);
+        if (dispatcher != null) {
+            return new RequestDispatcherWrapper(dispatcher);
+        }
+        return null;
+    }
+
+    @Override
+    public @Nullable RequestParameter getRequestParameter(@NotNull final String name) {
+        return this.wrappedRequest.getRequestParameter(name);
+    }
+
+    @Override
+    public @NotNull List<RequestParameter> getRequestParameterList() {
+        return this.wrappedRequest.getRequestParameterList();
+    }
+
+    @Override
+    public @NotNull RequestParameterMap getRequestParameterMap() {
+        return this.wrappedRequest.getRequestParameterMap();
+    }
+
+    @Override
+    public @Nullable RequestParameter[] getRequestParameters(@NotNull final String name) {
+        return this.wrappedRequest.getRequestParameters(name);
+    }
+
+    @Override
+    public @NotNull RequestPathInfo getRequestPathInfo() {
+        return this.wrappedRequest.getRequestPathInfo();
+    }
+
+    @Override
+    public @NotNull RequestProgressTracker getRequestProgressTracker() {
+        return this.wrappedRequest.getRequestProgressTracker();
+    }
+
+    @Override
+    public @NotNull Resource getResource() {
+        return this.wrappedRequest.getResource();
+    }
+
+    @Override
+    public @Nullable ResourceBundle getResourceBundle(final Locale locale) {
+        return this.wrappedRequest.getResourceBundle(locale);
+    }
+
+    @Override
+    public @Nullable ResourceBundle getResourceBundle(final String baseName, final Locale locale) {
+        return this.wrappedRequest.getResourceBundle(baseName, locale);
+    }
+
+    @Override
+    public @NotNull ResourceResolver getResourceResolver() {
+        return this.wrappedRequest.getResourceResolver();
+    }
+
+    @Override
+    public @Nullable String getResponseContentType() {
+        return this.wrappedRequest.getResponseContentType();
+    }
+
+    @Override
+    public @NotNull Enumeration<String> getResponseContentTypes() {
+        return this.wrappedRequest.getResponseContentTypes();
+    }
+
+    @Override
+    public <AdapterType> @Nullable AdapterType adaptTo(@NotNull final Class<AdapterType> type) {
+        return this.wrappedRequest.adaptTo(type);
+    }
+}
diff --git a/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxResponseWrapper.java b/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxResponseWrapper.java
new file mode 100644
index 0000000..f18220f
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxResponseWrapper.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.wrappers;
+
+import org.apache.felix.http.javaxwrappers.HttpServletResponseWrapper;
+import org.apache.felix.http.javaxwrappers.ServletResponseWrapper;
+import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
+
+/**
+ * Wrapper for {@link SlingJakartaHttpServletResponse} to adapt it to the Jacax Servlet API.
+ * @since 2.9.0
+ */
+@SuppressWarnings("deprecation")
+public class JakartaToJavaxResponseWrapper
+    extends HttpServletResponseWrapper
+    implements SlingHttpServletResponse {
+
+    /**
+     * Create a new wrapper
+     * @param Response Jakarta Servlet API based response object
+     * @return The wrapped response
+     */
+    public static javax.servlet.ServletResponse toJavaxResponse(final ServletResponse Response) {
+        if (Response instanceof JavaxToJakartaResponseWrapper) {
+            return ((JavaxToJakartaResponseWrapper)Response).getResponse();
+        }
+        if (Response instanceof SlingJakartaHttpServletResponse) {
+            return new JakartaToJavaxResponseWrapper((SlingJakartaHttpServletResponse)Response);
+        }
+        if (Response instanceof HttpServletResponse) {
+            return new HttpServletResponseWrapper((HttpServletResponse)Response);
+        }
+        return new ServletResponseWrapper(Response);
+    }
+
+    public static javax.servlet.http.HttpServletResponse toJavaxResponse(final HttpServletResponse Response) {
+        return (javax.servlet.http.HttpServletResponse)toJavaxResponse((ServletResponse)Response);
+    }
+
+    public static SlingHttpServletResponse toJavaxResponse(final SlingJakartaHttpServletResponse Response) {
+        return (SlingHttpServletResponse)toJavaxResponse((ServletResponse)Response);
+    }
+
+    private final SlingJakartaHttpServletResponse wrappedResponse;
+
+    public JakartaToJavaxResponseWrapper(final SlingJakartaHttpServletResponse wrappedResponse) {
+        super(wrappedResponse);
+        this.wrappedResponse = wrappedResponse;
+    }
+
+    @Override
+    public <AdapterType> @Nullable AdapterType adaptTo(@NotNull Class<AdapterType> type) {
+        return this.wrappedResponse.adaptTo(type);
+    }
+}
diff --git a/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxServletWrapper.java b/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxServletWrapper.java
new file mode 100644
index 0000000..93bde6a
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/wrappers/JakartaToJavaxServletWrapper.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.wrappers;
+
+import java.io.IOException;
+
+import org.apache.felix.http.jakartawrappers.ServletConfigWrapper;
+import org.apache.felix.http.javaxwrappers.ServletExceptionUtil;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.servlets.JakartaOptingServlet;
+import org.apache.sling.api.servlets.OptingServlet;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+/**
+ * This class wraps a servlet based on the Jakarta Servlet API
+ * to implement Servlet API 3.
+ * @since 2.9.0
+ */
+@SuppressWarnings("deprecation")
+public class JakartaToJavaxServletWrapper implements Servlet {
+
+    /**
+     * Create a new wrapper
+     * @param servlet The servlet to wrap
+     * @return The wrapped servlet
+     */
+    public static @Nullable Servlet toJavaxServlet(final @Nullable jakarta.servlet.Servlet servlet) {
+        if (servlet != null) {
+            if (servlet instanceof JakartaOptingServlet) {
+                return new JakartaToJavaxOptingServletWrapper((JakartaOptingServlet) servlet);
+            }
+            return new JakartaToJavaxServletWrapper(servlet);
+        }
+        return null;
+    }
+
+    private final jakarta.servlet.Servlet servlet;
+
+    public JakartaToJavaxServletWrapper(final jakarta.servlet.Servlet servlet) {
+         this.servlet = servlet;
+    }
+
+    @Override
+    public void init(final ServletConfig config) throws ServletException {
+        try {
+            this.servlet.init(new ServletConfigWrapper(config));
+        } catch (final jakarta.servlet.ServletException e) {
+            throw ServletExceptionUtil.getServletException(e);
+        }
+    }
+
+    @Override
+    public void service(final ServletRequest req, final ServletResponse res) throws ServletException, IOException {
+        try {
+            this.servlet.service(JavaxToJakartaRequestWrapper.toJakartaRequest(req), JavaxToJakartaResponseWrapper.toJakartaResponse(res));
+        } catch (final jakarta.servlet.ServletException e) {
+            throw ServletExceptionUtil.getServletException(e);
+        }
+    }
+
+    @Override
+    public void destroy() {
+        this.servlet.destroy();
+    }
+
+    @Override
+    public ServletConfig getServletConfig() {
+        if (this.servlet.getServletConfig() == null) {
+            return null;
+        }
+        return new org.apache.felix.http.javaxwrappers.ServletConfigWrapper(this.servlet.getServletConfig());
+    }
+
+    @Override
+    public String getServletInfo() {
+        return servlet.getServletInfo();
+    }
+
+    public static class JakartaToJavaxOptingServletWrapper extends JakartaToJavaxServletWrapper implements OptingServlet {
+
+        private final JakartaOptingServlet servlet;
+
+        public JakartaToJavaxOptingServletWrapper(final JakartaOptingServlet servlet) {
+            super(servlet);
+            this.servlet = servlet;
+        }
+
+        @Override
+        public boolean accepts(@NotNull SlingHttpServletRequest request) {
+            return this.servlet.accepts(JavaxToJakartaRequestWrapper.toJakartaRequest(request));
+        }
+    }
+}
+
diff --git a/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaFilterWrapper.java b/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaFilterWrapper.java
new file mode 100644
index 0000000..77f1160
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaFilterWrapper.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.wrappers;
+
+import java.io.IOException;
+
+import org.apache.felix.http.javaxwrappers.FilterConfigWrapper;
+import org.apache.felix.http.jakartawrappers.ServletExceptionUtil;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+
+/**
+ * This class wraps a filter based on the Servlet API 3
+ * to implement Jakarta Servlet API.
+ * @since 2.9.0
+ */
+public class JavaxToJakartaFilterWrapper implements Filter {
+
+    /**
+     * Create a new wrapper
+     * @param filter The filter to wrap
+     * @return The wrapped filter
+     */
+    public static @Nullable Filter toJakartaFilter(final @Nullable javax.servlet.Filter filter) {
+        if (filter != null) {
+            return new JavaxToJakartaFilterWrapper(filter);
+        }
+        return null;
+    }
+
+    private final javax.servlet.Filter filter;
+
+    public JavaxToJakartaFilterWrapper(final javax.servlet.Filter filter) {
+         this.filter = filter;
+    }
+
+    @Override
+    public void init(final FilterConfig config) throws ServletException {
+        try {
+            this.filter.init(new FilterConfigWrapper(config));
+        } catch (final javax.servlet.ServletException e) {
+            throw ServletExceptionUtil.getServletException(e);
+        }
+    }
+
+    @Override
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
+            throws IOException, ServletException {
+        try {
+            this.filter.doFilter(JakartaToJavaxRequestWrapper.toJavaxRequest(request),
+                JakartaToJavaxResponseWrapper.toJavaxResponse(response),
+                new FilterChainWrapper(chain));
+        } catch (final javax.servlet.ServletException e) {
+            throw ServletExceptionUtil.getServletException(e);
+        }
+    }
+
+    @Override
+    public void destroy() {
+        this.filter.destroy();
+    }
+
+    public static class FilterChainWrapper implements javax.servlet.FilterChain{
+
+        private final FilterChain filterChain;
+
+        public FilterChainWrapper(@NotNull final FilterChain chain) {
+            this.filterChain = chain;
+        }
+
+        @Override
+        public void doFilter(final javax.servlet.ServletRequest request, final javax.servlet.ServletResponse response)
+                throws IOException, javax.servlet.ServletException {
+            try {
+                this.filterChain.doFilter(JavaxToJakartaRequestWrapper.toJakartaRequest(request), JavaxToJakartaResponseWrapper.toJakartaResponse(response));
+            } catch (final jakarta.servlet.ServletException e) {
+                throw org.apache.felix.http.javaxwrappers.ServletExceptionUtil.getServletException(e);
+            }
+        }
+    }
+}
+
diff --git a/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaRequestWrapper.java b/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaRequestWrapper.java
new file mode 100644
index 0000000..8b83561
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaRequestWrapper.java
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.wrappers;
+
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.felix.http.jakartawrappers.CookieWrapper;
+import org.apache.felix.http.jakartawrappers.HttpServletRequestWrapper;
+import org.apache.felix.http.jakartawrappers.RequestDispatcherWrapper;
+import org.apache.felix.http.jakartawrappers.ServletRequestWrapper;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.request.RequestDispatcherOptions;
+import org.apache.sling.api.request.RequestParameter;
+import org.apache.sling.api.request.RequestParameterMap;
+import org.apache.sling.api.request.RequestPathInfo;
+import org.apache.sling.api.request.RequestProgressTracker;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletRequest;
+
+/**
+ * Wrapper for {@link SlingHttpServletRequest} to adapt it to the Jakarta Servlet API.
+ * @since 2.9.0
+ */
+@SuppressWarnings("deprecation")
+public class JavaxToJakartaRequestWrapper
+    extends HttpServletRequestWrapper
+    implements SlingJakartaHttpServletRequest {
+
+    /**
+     * Create a new wrapper
+     * @param request The request object
+     * @return The wrapped request object
+     */
+    public static ServletRequest toJakartaRequest(final javax.servlet.ServletRequest request) {
+        if (request instanceof JakartaToJavaxRequestWrapper) {
+            return ((JakartaToJavaxRequestWrapper)request).getRequest();
+        }
+        if (request instanceof SlingHttpServletRequest) {
+            return new JavaxToJakartaRequestWrapper((SlingHttpServletRequest)request);
+        }
+        if (request instanceof javax.servlet.http.HttpServletRequest) {
+            return new HttpServletRequestWrapper((javax.servlet.http.HttpServletRequest)request);
+        }
+        return new ServletRequestWrapper(request);
+    }
+
+    public static HttpServletRequest toJakartaRequest(final javax.servlet.http.HttpServletRequest request) {
+        return (HttpServletRequest)toJakartaRequest((javax.servlet.ServletRequest)request);
+    }
+
+    public static SlingJakartaHttpServletRequest toJakartaRequest(final SlingHttpServletRequest request) {
+        return (SlingJakartaHttpServletRequest)toJakartaRequest((javax.servlet.ServletRequest)request);
+    }
+
+    private final SlingHttpServletRequest wrappedRequest;
+
+    public JavaxToJakartaRequestWrapper(final SlingHttpServletRequest wrappedRequest) {
+        super(wrappedRequest);
+        this.wrappedRequest = wrappedRequest;
+    }
+
+    @Override
+    public @Nullable Cookie getCookie(final String name) {
+        final javax.servlet.http.Cookie cookie = this.wrappedRequest.getCookie(name);
+        if (cookie != null) {
+            return new CookieWrapper(cookie);
+        }
+        return null;
+    }
+
+    @Override
+    public @Nullable RequestDispatcher getRequestDispatcher(@NotNull final String path, final RequestDispatcherOptions options) {
+        final javax.servlet.RequestDispatcher dispatcher = this.wrappedRequest.getRequestDispatcher(path, options);
+        if (dispatcher != null) {
+            return new RequestDispatcherWrapper(dispatcher);
+        }
+        return null;
+    }
+
+    @Override
+    public @Nullable RequestDispatcher getRequestDispatcher(@NotNull final Resource resource,
+            RequestDispatcherOptions options) {
+                final javax.servlet.RequestDispatcher dispatcher = this.wrappedRequest.getRequestDispatcher(resource, options);
+                if (dispatcher != null) {
+                    return new RequestDispatcherWrapper(dispatcher);
+                }
+                return null;
+            }
+
+    @Override
+    public @Nullable RequestDispatcher getRequestDispatcher(@NotNull final Resource resource) {
+        final javax.servlet.RequestDispatcher dispatcher = this.wrappedRequest.getRequestDispatcher(resource);
+        if (dispatcher != null) {
+            return new RequestDispatcherWrapper(dispatcher);
+        }
+        return null;
+    }
+
+    @Override
+    public @Nullable RequestParameter getRequestParameter(@NotNull final String name) {
+        return this.wrappedRequest.getRequestParameter(name);
+    }
+
+    @Override
+    public @NotNull List<RequestParameter> getRequestParameterList() {
+        return this.wrappedRequest.getRequestParameterList();
+    }
+
+    @Override
+    public @NotNull RequestParameterMap getRequestParameterMap() {
+        return this.wrappedRequest.getRequestParameterMap();
+    }
+
+    @Override
+    public @Nullable RequestParameter[] getRequestParameters(@NotNull final String name) {
+        return this.wrappedRequest.getRequestParameters(name);
+    }
+
+    @Override
+    public @NotNull RequestPathInfo getRequestPathInfo() {
+        return this.wrappedRequest.getRequestPathInfo();
+    }
+
+    @Override
+    public @NotNull RequestProgressTracker getRequestProgressTracker() {
+        return this.wrappedRequest.getRequestProgressTracker();
+    }
+
+    @Override
+    public @NotNull Resource getResource() {
+        return this.wrappedRequest.getResource();
+    }
+
+    @Override
+    public @Nullable ResourceBundle getResourceBundle(final Locale locale) {
+        return this.wrappedRequest.getResourceBundle(locale);
+    }
+
+    @Override
+    public @Nullable ResourceBundle getResourceBundle(final String baseName, final Locale locale) {
+        return this.wrappedRequest.getResourceBundle(baseName, locale);
+    }
+
+    @Override
+    public @NotNull ResourceResolver getResourceResolver() {
+        return this.wrappedRequest.getResourceResolver();
+    }
+
+    @Override
+    public @Nullable String getResponseContentType() {
+        return this.wrappedRequest.getResponseContentType();
+    }
+
+    @Override
+    public @NotNull Enumeration<String> getResponseContentTypes() {
+        return this.wrappedRequest.getResponseContentTypes();
+    }
+
+    @Override
+    public <AdapterType> @Nullable AdapterType adaptTo(@NotNull final Class<AdapterType> type) {
+        return this.wrappedRequest.adaptTo(type);
+    }
+}
diff --git a/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaResponseWrapper.java b/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaResponseWrapper.java
new file mode 100644
index 0000000..cecae0e
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaResponseWrapper.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.wrappers;
+
+import org.apache.felix.http.jakartawrappers.HttpServletResponseWrapper;
+import org.apache.felix.http.jakartawrappers.ServletResponseWrapper;
+import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
+
+/**
+ * Wrapper for {@link SlingHttpServletResponse} to adapt it to the Jacax Servlet API.
+ * @since 2.9.0
+ */
+@SuppressWarnings("deprecation")
+public class JavaxToJakartaResponseWrapper
+    extends HttpServletResponseWrapper
+    implements SlingJakartaHttpServletResponse {
+
+    /**
+     * Create a new wrapper
+     * @param response The response object
+     * @return The wrapped response object
+     */
+    public static ServletResponse toJakartaResponse(final javax.servlet.ServletResponse response) {
+        if (response instanceof JakartaToJavaxResponseWrapper) {
+            return ((JakartaToJavaxResponseWrapper)response).getResponse();
+        }
+        if (response instanceof SlingHttpServletResponse) {
+            return new JavaxToJakartaResponseWrapper((SlingHttpServletResponse)response);
+        }
+        if (response instanceof javax.servlet.http.HttpServletResponse) {
+            return new HttpServletResponseWrapper((javax.servlet.http.HttpServletResponse)response);
+        }
+        return new ServletResponseWrapper(response);
+    }
+
+    public static HttpServletResponse toJakartaResponse(final javax.servlet.http.HttpServletResponse response) {
+        return (HttpServletResponse)toJakartaResponse((javax.servlet.ServletResponse)response);
+    }
+
+    public static SlingJakartaHttpServletResponse toJakartaResponse(final SlingHttpServletResponse response) {
+        return (SlingJakartaHttpServletResponse)toJakartaResponse((javax.servlet.ServletResponse)response);
+    }
+
+    private final SlingHttpServletResponse wrappedResponse;
+
+    public JavaxToJakartaResponseWrapper(final SlingHttpServletResponse wrappedResponse) {
+        super(wrappedResponse);
+        this.wrappedResponse = wrappedResponse;
+    }
+
+    @Override
+    public <AdapterType> @Nullable AdapterType adaptTo(@NotNull Class<AdapterType> type) {
+        return this.wrappedResponse.adaptTo(type);
+    }
+}
diff --git a/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaServletWrapper.java b/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaServletWrapper.java
new file mode 100644
index 0000000..e535dca
--- /dev/null
+++ b/src/main/java/org/apache/sling/api/wrappers/JavaxToJakartaServletWrapper.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.api.wrappers;
+
+import java.io.IOException;
+
+import org.apache.felix.http.javaxwrappers.ServletConfigWrapper;
+import org.apache.felix.http.jakartawrappers.ServletExceptionUtil;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
+import org.apache.sling.api.servlets.JakartaOptingServlet;
+import org.apache.sling.api.servlets.OptingServlet;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import jakarta.servlet.Servlet;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+
+/**
+ * This class wraps a servlet based on the Servlet API 3
+ * to implement Jakarta Servlet API.
+ * @since 2.9.0
+ */
+@SuppressWarnings("deprecation")
+public class JavaxToJakartaServletWrapper implements Servlet {
+
+    /**
+     * Create a new wrapper
+     * @param servlet The servlet to wrap
+     * @return The wrapped servlet
+     */
+    public static @Nullable Servlet toJakartaServlet(final @Nullable javax.servlet.Servlet servlet) {
+        if (servlet != null) {
+            if (servlet instanceof OptingServlet) {
+                return new JavaxToJakartaOptingServletWrapper((OptingServlet) servlet);
+            }
+            return new JavaxToJakartaServletWrapper(servlet);
+        }
+        return null;
+    }
+
+    private final javax.servlet.Servlet servlet;
+
+    public JavaxToJakartaServletWrapper(final javax.servlet.Servlet servlet) {
+         this.servlet = servlet;
+    }
+
+    @Override
+    public void init(final ServletConfig config) throws ServletException {
+        try {
+            this.servlet.init(new ServletConfigWrapper(config));
+        } catch (final javax.servlet.ServletException e) {
+            throw ServletExceptionUtil.getServletException(e);
+        }
+    }
+
+    @Override
+    public void service(final ServletRequest req, final ServletResponse res) throws ServletException, IOException {
+        try {
+            this.servlet.service(JakartaToJavaxRequestWrapper.toJavaxRequest(req), JakartaToJavaxResponseWrapper.toJavaxResponse(res));
+        } catch (final javax.servlet.ServletException e) {
+            throw ServletExceptionUtil.getServletException(e);
+        }
+    }
+
+    @Override
+    public void destroy() {
+        this.servlet.destroy();
+    }
+
+    @Override
+    public ServletConfig getServletConfig() {
+        if (this.servlet.getServletConfig() == null) {
+            return null;
+        }
+        return new org.apache.felix.http.jakartawrappers.ServletConfigWrapper(this.servlet.getServletConfig());
+    }
+
+    @Override
+    public String getServletInfo() {
+        return servlet.getServletInfo();
+    }
+
+    public static class JavaxToJakartaOptingServletWrapper extends JavaxToJakartaServletWrapper implements JakartaOptingServlet {
+
+        private final OptingServlet servlet;
+
+        public JavaxToJakartaOptingServletWrapper(final OptingServlet servlet) {
+            super(servlet);
+            this.servlet = servlet;
+        }
+
+        @Override
+        public boolean accepts(@NotNull SlingJakartaHttpServletRequest request) {
+            return this.servlet.accepts(JakartaToJavaxRequestWrapper.toJavaxRequest(request));
+        }
+    }
+}
+
diff --git a/src/main/java/org/apache/sling/api/wrappers/ResourceResolverWrapper.java b/src/main/java/org/apache/sling/api/wrappers/ResourceResolverWrapper.java
index 9fa46d4..a37adb2 100644
--- a/src/main/java/org/apache/sling/api/wrappers/ResourceResolverWrapper.java
+++ b/src/main/java/org/apache/sling/api/wrappers/ResourceResolverWrapper.java
@@ -21,7 +21,7 @@ import java.util.Map;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
 
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.PersistenceException;
@@ -68,6 +68,27 @@ public class ResourceResolverWrapper implements ResourceResolver {
         return ResourceResolverResourceWrapper.wrap(this, wrapped.resolve(request, absPath));
     }
 
+    /**
+     * Wraps and returns the {@code Resource} obtained by calling {@code resolve} on the wrapped resource resolver.
+     *
+     * @param request The http servlet request object providing more hints at
+     *                how to resolve the <code>absPath</code>. This parameter may be
+     *                <code>null</code> in which case the implementation should use
+     *                reasonable defaults.
+     * @param absPath The absolute path to be resolved to a resource. If this
+     *                parameter is <code>null</code>, it is assumed to address the
+     *                root of the resource tree. If the path is relative it is
+     *                assumed relative to the root, that is a slash is prepended to
+     *                the path before resolving it.
+     * @return a wrapped resource obtained through the wrapped resource resolver
+     */
+    @NotNull
+    @Override
+    @Deprecated
+    public Resource resolve(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull String absPath) {
+        return ResourceResolverResourceWrapper.wrap(this, wrapped.resolve(request, absPath));
+    }
+
     /**
      * Wraps and returns the {@code Resource} obtained by calling {@code resolve} on the wrapped resource resolver.
      *
@@ -94,7 +115,7 @@ public class ResourceResolverWrapper implements ResourceResolver {
     @SuppressWarnings("deprecation")
     @NotNull
     @Override
-    public Resource resolve(@NotNull HttpServletRequest request) {
+    public Resource resolve(@NotNull javax.servlet.http.HttpServletRequest request) {
         return ResourceResolverResourceWrapper.wrap(this, wrapped.resolve(request));
     }
 
@@ -109,6 +130,12 @@ public class ResourceResolverWrapper implements ResourceResolver {
         return wrapped.map(request, resourcePath);
     }
 
+    @Override
+    @Deprecated
+    public String map(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull String resourcePath) {
+        return wrapped.map(request, resourcePath);
+    }
+
     /**
      * Wraps and returns the {@code Resource} obtained by calling {@code getResource} on the wrapped resource resolver.
      *
@@ -348,7 +375,7 @@ public class ResourceResolverWrapper implements ResourceResolver {
     public Resource move(String srcAbsPath, String destAbsPath) throws PersistenceException {
         return ResourceResolverResourceWrapper.wrap(this, wrapped.move(srcAbsPath, destAbsPath));
     }
-    
+
     @Override
     public Map<String,Object> getPropertyMap() {
         return wrapped.getPropertyMap();
diff --git a/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java b/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
index a5402c6..201f215 100644
--- a/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
+++ b/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
@@ -40,7 +40,9 @@ import org.apache.sling.api.resource.ResourceResolver;
  * The <code>SlingHttpServletRequestWrapper</code> class is a default wrapper
  * class around a {@link SlingHttpServletRequest} which may be extended to amend
  * the functionality of the original request object.
+ * @deprecated Use {@link SlingJakartaHttpServletRequestWrapper}
  */
+@Deprecated
 public class SlingHttpServletRequestWrapper extends HttpServletRequestWrapper
         implements SlingHttpServletRequest {
 
diff --git a/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java b/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
index 317e293..df16f40 100644
--- a/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
+++ b/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
@@ -30,7 +30,9 @@ import org.apache.sling.api.SlingHttpServletResponse;
  * There's nothing interesting to wrap currently, as the SlingHttpServletResponse
  * interface is empty.
  * So this exists only for symmetry with {@link SlingHttpServletRequestWrapper}
+ * @deprecated Use {@link SlingJakartaHttpServletResponseWrapper}
  */
+@Deprecated
 public class SlingHttpServletResponseWrapper extends HttpServletResponseWrapper
         implements SlingHttpServletResponse {
 
diff --git a/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java b/src/main/java/org/apache/sling/api/wrappers/SlingJakartaHttpServletRequestWrapper.java
similarity index 83%
copy from src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
copy to src/main/java/org/apache/sling/api/wrappers/SlingJakartaHttpServletRequestWrapper.java
index a5402c6..5a56e26 100644
--- a/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
+++ b/src/main/java/org/apache/sling/api/wrappers/SlingJakartaHttpServletRequestWrapper.java
@@ -23,11 +23,11 @@ import java.util.List;
 import java.util.Locale;
 import java.util.ResourceBundle;
 
-import javax.servlet.RequestDispatcher;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequestWrapper;
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletRequestWrapper;
 
-import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.apache.sling.api.request.RequestDispatcherOptions;
 import org.apache.sling.api.request.RequestParameter;
 import org.apache.sling.api.request.RequestParameterMap;
@@ -37,28 +37,29 @@ import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 
 /**
- * The <code>SlingHttpServletRequestWrapper</code> class is a default wrapper
- * class around a {@link SlingHttpServletRequest} which may be extended to amend
+ * The <code>SlingJakartaHttpServletRequestWrapper</code> class is a default wrapper
+ * class around a {@link SlingJakartaHttpServletRequest} which may be extended to amend
  * the functionality of the original request object.
+ * @since 2.9.0
  */
-public class SlingHttpServletRequestWrapper extends HttpServletRequestWrapper
-        implements SlingHttpServletRequest {
+public class SlingJakartaHttpServletRequestWrapper extends HttpServletRequestWrapper
+        implements SlingJakartaHttpServletRequest {
 
     /**
      * Create a wrapper for the supplied wrappedRequest
      * @param wrappedRequest The request.
      */
-    public SlingHttpServletRequestWrapper(SlingHttpServletRequest wrappedRequest) {
+    public SlingJakartaHttpServletRequestWrapper(SlingJakartaHttpServletRequest wrappedRequest) {
         super(wrappedRequest);
     }
 
     /**
-     * Return the original {@link SlingHttpServletRequest} object wrapped by
+     * Return the original {@link SlingJakartaHttpServletRequest} object wrapped by
      * this.
      * @return The wrapped request.
      */
-    public SlingHttpServletRequest getSlingRequest() {
-        return (SlingHttpServletRequest) getRequest();
+    public SlingJakartaHttpServletRequest getSlingRequest() {
+        return (SlingJakartaHttpServletRequest) getRequest();
     }
 
     @Override
diff --git a/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java b/src/main/java/org/apache/sling/api/wrappers/SlingJakartaHttpServletResponseWrapper.java
similarity index 58%
copy from src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
copy to src/main/java/org/apache/sling/api/wrappers/SlingJakartaHttpServletResponseWrapper.java
index 317e293..b943a13 100644
--- a/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
+++ b/src/main/java/org/apache/sling/api/wrappers/SlingJakartaHttpServletResponseWrapper.java
@@ -18,37 +18,38 @@
  */
 package org.apache.sling.api.wrappers;
 
-import javax.servlet.http.HttpServletResponseWrapper;
+import jakarta.servlet.http.HttpServletResponseWrapper;
 
-import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.SlingJakartaHttpServletResponse;
 
 /**
- * The <code>SlingHttpServletResponseWrapper</code> class is a default wrapper
- * class around a {@link SlingHttpServletResponse} which may be extended to
+ * The <code>SlingJakartaHttpServletResponseWrapper</code> class is a default wrapper
+ * class around a {@link SlingJakartaHttpServletResponse} which may be extended to
  * amend the functionality of the original response object.
  *
- * There's nothing interesting to wrap currently, as the SlingHttpServletResponse
+ * There's nothing interesting to wrap currently, as the SlingJakartaHttpServletResponse
  * interface is empty.
- * So this exists only for symmetry with {@link SlingHttpServletRequestWrapper}
+ * So this exists only for symmetry with {@link SlingJakartaHttpServletRequestWrapper}
+ * @since 2.9.0
  */
-public class SlingHttpServletResponseWrapper extends HttpServletResponseWrapper
-        implements SlingHttpServletResponse {
+public class SlingJakartaHttpServletResponseWrapper extends HttpServletResponseWrapper
+        implements SlingJakartaHttpServletResponse {
 
     /**
      * Create a wrapper for the supplied wrappedRequest
      * @param wrappedResponse The response
      */
-    public SlingHttpServletResponseWrapper(SlingHttpServletResponse wrappedResponse) {
+    public SlingJakartaHttpServletResponseWrapper(SlingJakartaHttpServletResponse wrappedResponse) {
         super(wrappedResponse);
     }
 
     /**
-     * Return the original {@link SlingHttpServletResponse} object wrapped by
+     * Return the original {@link SlingJakartaHttpServletResponse} object wrapped by
      * this.
      * @return The wrapped response.
      */
-    public SlingHttpServletResponse getSlingResponse() {
-        return (SlingHttpServletResponse) getResponse();
+    public SlingJakartaHttpServletResponse getSlingResponse() {
+        return (SlingJakartaHttpServletResponse) getResponse();
     }
 
     @Override
diff --git a/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java b/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java
index 6684787..e285d4a 100644
--- a/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java
+++ b/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java
@@ -18,12 +18,13 @@
  */
 package org.apache.sling.api.wrappers;
 
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.http.HttpServletRequest;
 
 /**
  * This class is not a "wrapper" per se, but computes the correct path info,
  * request URI, etc. for included requests. When including a request via
- * {@link javax.servlet.RequestDispatcher}, the Servlet API specifies that
+ * {@link jakarta.servlet.RequestDispatcher}, the Servlet API specifies that
  * target paths of the included request are available as request attributes.
  * {@code Request.getPathInfo()}, for example will return the value for the
  * including request, *not* for the included one.
@@ -33,34 +34,109 @@ import javax.servlet.http.HttpServletRequest;
  */
 public class SlingRequestPaths {
 
+    /**
+     * Return the context path for r, using the appropriate request attribute if
+     * the request is an included one.
+     * @param r The request
+     * @return The context path.
+     */
+    public static String getContextPath(HttpServletRequest r) {
+        final String attr = (String) r.getAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH);
+        return attr != null ? attr : r.getContextPath();
+    }
+
+    /**
+     * Return the context path for r, using the appropriate request attribute if
+     * the request is an included one.
+     * @param r The request
+     * @return The path info.
+     */
+    public static String getPathInfo(HttpServletRequest r) {
+        final String attr = (String) r.getAttribute(RequestDispatcher.INCLUDE_PATH_INFO);
+        return attr != null ? attr : r.getPathInfo();
+    }
+
+    /**
+     * Return the query string for r, using the appropriate request attribute if
+     * the request is an included one.
+     * @param r The request
+     * @return The query string.
+     */
+    public static String getQueryString(HttpServletRequest r) {
+        final String attr = (String) r.getAttribute(RequestDispatcher.INCLUDE_QUERY_STRING);
+        return attr != null ? attr : r.getQueryString();
+    }
+
+    /**
+     * Return the request URI for r, using the appropriate request attribute if
+     * the request is an included one.
+     * @param r The request
+     * @return The request uri.
+     */
+    public static String getRequestURI(HttpServletRequest r) {
+        final String attr = (String) r.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI);
+        return attr != null ? attr : r.getRequestURI();
+    }
+
+    /**
+     * Return the servlet path for r, using the appropriate request attribute if
+     * the request is an included one.
+     * @param r The request
+     * @return The servlet path.
+     */
+    public static String getServletPath(HttpServletRequest r) {
+        final String attr = (String) r.getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
+        return attr != null ? attr : r.getServletPath();
+    }
+
+    /**
+     * True if r is an included request, in which case it has the
+     * INCLUDE_REQUEST_URI attribute
+     * @param r The request
+     * @return {@code true} if this is an include.
+     */
+    public static boolean isIncluded(HttpServletRequest r) {
+        return r.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI) != null;
+    }
+
     /**
      * Attribute name used by the RequestDispatcher to indicate the context path
      * of the included request, as a String.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_CONTEXT_PATH}
      */
+    @Deprecated
     public static final String INCLUDE_CONTEXT_PATH = "javax.servlet.include.context_path";
 
     /**
      * Attribute name used by the RequestDispatcher to indicate the path info of
      * the included request, as a String.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_PATH_INFO}
      */
+    @Deprecated
     public static final String INCLUDE_PATH_INFO = "javax.servlet.include.path_info";
 
     /**
      * Attribute name used by the RequestDispatcher to indicate the query string
      * of the included request, as a String.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_QUERY_STRING}
      */
+    @Deprecated
     public static final String INCLUDE_QUERY_STRING = "javax.servlet.include.query_string";
 
     /**
      * Attribute name used by the RequestDispatcher to indicate the request URI
      * of the included request, as a String.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_REQUEST_URI}
      */
+    @Deprecated
     public static final String INCLUDE_REQUEST_URI = "javax.servlet.include.request_uri";
 
     /**
      * Attribute name used by the RequestDispatcher to indicate the servlet path
      * of the included request, as a String.
+     * @deprecated Use {@link javax.servlet.RequestDispatcher#INCLUDE_SERVLET_PATH}
      */
+    @Deprecated
     public static final String INCLUDE_SERVLET_PATH = "javax.servlet.include.servlet_path";
 
     /**
@@ -68,8 +144,10 @@ public class SlingRequestPaths {
      * the request is an included one.
      * @param r The request
      * @return The context path.
+     * @deprecated Use {@link #getContextPath(HttpServletRequest)}
      */
-    public static String getContextPath(HttpServletRequest r) {
+    @Deprecated
+    public static String getContextPath(javax.servlet.http.HttpServletRequest r) {
         final String attr = (String) r.getAttribute(INCLUDE_CONTEXT_PATH);
         return attr != null ? attr : r.getContextPath();
     }
@@ -79,8 +157,10 @@ public class SlingRequestPaths {
      * the request is an included one.
      * @param r The request
      * @return The path info.
+     * @deprecated Use {@link #getPathInfo(HttpServletRequest)}
      */
-    public static String getPathInfo(HttpServletRequest r) {
+    @Deprecated
+    public static String getPathInfo(javax.servlet.http.HttpServletRequest r) {
         final String attr = (String) r.getAttribute(INCLUDE_PATH_INFO);
         return attr != null ? attr : r.getPathInfo();
     }
@@ -90,8 +170,10 @@ public class SlingRequestPaths {
      * the request is an included one.
      * @param r The request
      * @return The query string.
+     * @deprecated Use {@link #getQueryString(HttpServletRequest)}
      */
-    public static String getQueryString(HttpServletRequest r) {
+    @Deprecated
+    public static String getQueryString(javax.servlet.http.HttpServletRequest r) {
         final String attr = (String) r.getAttribute(INCLUDE_QUERY_STRING);
         return attr != null ? attr : r.getQueryString();
     }
@@ -101,8 +183,10 @@ public class SlingRequestPaths {
      * the request is an included one.
      * @param r The request
      * @return The request uri.
+     * @deprecated Use {@link #getRequestURI(HttpServletRequest)}
      */
-    public static String getRequestURI(HttpServletRequest r) {
+    @Deprecated
+    public static String getRequestURI(javax.servlet.http.HttpServletRequest r) {
         final String attr = (String) r.getAttribute(INCLUDE_REQUEST_URI);
         return attr != null ? attr : r.getRequestURI();
     }
@@ -112,8 +196,10 @@ public class SlingRequestPaths {
      * the request is an included one.
      * @param r The request
      * @return The servlet path.
+     * @deprecated Use {@link #getServletPath(HttpServletRequest)}
      */
-    public static String getServletPath(HttpServletRequest r) {
+    @Deprecated
+    public static String getServletPath(javax.servlet.http.HttpServletRequest r) {
         final String attr = (String) r.getAttribute(INCLUDE_SERVLET_PATH);
         return attr != null ? attr : r.getServletPath();
     }
@@ -123,8 +209,10 @@ public class SlingRequestPaths {
      * INCLUDE_REQUEST_URI attribute
      * @param r The request
      * @return {@code true} if this is an include.
+     * @deprecated Use {@link #isIncluded(HttpServletRequest)}
      */
-    public static boolean isIncluded(HttpServletRequest r) {
+    @Deprecated
+    public static boolean isIncluded(javax.servlet.http.HttpServletRequest r) {
         return r.getAttribute(INCLUDE_REQUEST_URI) != null;
     }
 }
diff --git a/src/main/java/org/apache/sling/api/wrappers/package-info.java b/src/main/java/org/apache/sling/api/wrappers/package-info.java
index 8a2b990..162f8cf 100644
--- a/src/main/java/org/apache/sling/api/wrappers/package-info.java
+++ b/src/main/java/org/apache/sling/api/wrappers/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("2.8.0")
+@Version("2.9.0")
 package org.apache.sling.api.wrappers;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/test/java/org/apache/sling/api/request/RequestUtilTest.java b/src/test/java/org/apache/sling/api/request/RequestUtilTest.java
index af09ef4..c886d0e 100644
--- a/src/test/java/org/apache/sling/api/request/RequestUtilTest.java
+++ b/src/test/java/org/apache/sling/api/request/RequestUtilTest.java
@@ -18,16 +18,9 @@
  */
 package org.apache.sling.api.request;
 
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Locale;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
 import org.mockito.Mockito;
@@ -36,6 +29,7 @@ import junit.framework.TestCase;
 
 public class RequestUtilTest extends TestCase {
 
+    @SuppressWarnings("deprecation")
     public void testHandleIfModifiedSince(){
         assertTrue(RequestUtil.handleIfModifiedSince(getMockRequest(1309268989938L,1309269042730L),getMockResponse()));
 
@@ -43,8 +37,29 @@ public class RequestUtilTest extends TestCase {
         assertFalse(RequestUtil.handleIfModifiedSince(getMockRequest(-1,1309268989938L),getMockResponse()));
     }
 
-    protected SlingHttpServletRequest getMockRequest(final long modificationTime, final long ifModifiedSince) {
-        SlingHttpServletRequest r = Mockito.mock(SlingHttpServletRequest.class);
+    public void testHandleIfModifiedSinceJakarta(){
+        assertTrue(RequestUtil.handleIfModifiedSince(getMockRequestJakarta(1309268989938L,1309269042730L), getMockResponseJakarta()));
+
+        assertFalse(RequestUtil.handleIfModifiedSince(getMockRequestJakarta(1309269042730L,1309268989938L),getMockResponseJakarta()));
+        assertFalse(RequestUtil.handleIfModifiedSince(getMockRequestJakarta(-1,1309268989938L),getMockResponseJakarta()));
+    }
+
+    protected SlingJakartaHttpServletRequest getMockRequestJakarta(final long modificationTime, final long ifModifiedSince) {
+        SlingJakartaHttpServletRequest r = Mockito.mock(SlingJakartaHttpServletRequest.class);
+        Mockito.when(r.getDateHeader(Mockito.anyString())).thenReturn(ifModifiedSince);
+        final String path = "/foo/node";
+        final Resource mr = Mockito.mock(Resource.class);
+        Mockito.when(mr.getPath()).thenReturn(path);
+        final ResourceMetadata metadata = new ResourceMetadata();
+        metadata.setModificationTime(modificationTime);
+        Mockito.when(mr.getResourceMetadata()).thenReturn(metadata);
+        Mockito.when(r.getResource()).thenReturn(mr);
+        return r;
+    }
+
+    @SuppressWarnings("deprecation")
+    protected org.apache.sling.api.SlingHttpServletRequest getMockRequest(final long modificationTime, final long ifModifiedSince) {
+        org.apache.sling.api.SlingHttpServletRequest r = Mockito.mock(org.apache.sling.api.SlingHttpServletRequest.class);
         Mockito.when(r.getDateHeader(Mockito.anyString())).thenReturn(ifModifiedSince);
         final String path = "/foo/node";
         final Resource mr = Mockito.mock(Resource.class);
@@ -66,154 +81,11 @@ public class RequestUtilTest extends TestCase {
     }
 
     protected HttpServletResponse getMockResponse() {
-
-        return new HttpServletResponse() {
-
-            @Override
-            public void setLocale(Locale loc) {}
-
-            @Override
-            public void setContentType(String type) {}
-
-            @Override
-            public void setContentLength(int len) {}
-
-            @Override
-            public void setCharacterEncoding(String charset) {}
-
-            @Override
-            public void setBufferSize(int size) {}
-
-            @Override
-            public void resetBuffer() {}
-
-            @Override
-            public void reset() {}
-
-            @Override
-            public boolean isCommitted() {
-                return false;
-            }
-
-            @Override
-            public PrintWriter getWriter() throws IOException {
-                return null;
-            }
-
-            @Override
-            public ServletOutputStream getOutputStream() throws IOException {
-                return null;
-            }
-
-            @Override
-            public Locale getLocale() {
-                return null;
-            }
-
-            @Override
-            public String getContentType() {
-                return null;
-            }
-
-            @Override
-            public String getCharacterEncoding() {
-                return null;
-            }
-
-            @Override
-            public int getBufferSize() {
-                return 0;
-            }
-
-            @Override
-            public void flushBuffer() throws IOException {}
-
-            @Override
-            public void setStatus(int sc, String sm) {}
-
-            @Override
-            public void setStatus(int sc) {}
-
-            @Override
-            public void setIntHeader(String name, int value) {}
-
-            @Override
-            public void setHeader(String name, String value) {}
-
-            @Override
-            public void setDateHeader(String name, long date) {}
-
-            @Override
-            public void sendRedirect(String location) throws IOException {}
-
-            @Override
-            public void sendError(int sc, String msg) throws IOException {}
-
-            @Override
-            public void sendError(int sc) throws IOException {}
-
-            @Override
-            public String encodeUrl(String url) {
-                return null;
-            }
-
-            @Override
-            public String encodeURL(String url) {
-                return null;
-            }
-
-            @Override
-            public String encodeRedirectUrl(String url) {
-                return null;
-            }
-
-            @Override
-            public String encodeRedirectURL(String url) {
-                return null;
-            }
-
-            @Override
-            public boolean containsHeader(String name) {
-                return false;
-            }
-
-            @Override
-            public void addIntHeader(String name, int value) {}
-
-            @Override
-            public void addHeader(String name, String value) {}
-
-            @Override
-            public void addDateHeader(String name, long date) {}
-
-            @Override
-            public void addCookie(Cookie cookie) {}
-
-            @Override
-            public void setContentLengthLong(long len) {}
-
-            @Override
-            public int getStatus() {
-                return 0;
-            }
-
-            @Override
-            public String getHeader(String name) {
-                return null;
-            }
-
-            @Override
-            public Collection<String> getHeaders(String name) {
-                return null;
-            }
-
-            @Override
-            public Collection<String> getHeaderNames() {
-                return null;
-            }
-        };
-
+        return Mockito.mock(HttpServletResponse.class);
     }
 
-
+    protected jakarta.servlet.http.HttpServletResponse getMockResponseJakarta() {
+        final jakarta.servlet.http.HttpServletResponse res = Mockito.mock(jakarta.servlet.http.HttpServletResponse.class);
+        return res;
+    }
 }
diff --git a/src/test/java/org/apache/sling/api/request/builder/impl/HttpSessionImplTest.java b/src/test/java/org/apache/sling/api/request/builder/impl/HttpSessionImplTest.java
index 2fff2d3..53fc58e 100644
--- a/src/test/java/org/apache/sling/api/request/builder/impl/HttpSessionImplTest.java
+++ b/src/test/java/org/apache/sling/api/request/builder/impl/HttpSessionImplTest.java
@@ -58,16 +58,6 @@ public class HttpSessionImplTest {
         assertFalse(httpSession.getAttributeNames().hasMoreElements());
     }
 
-    @Test
-    public void testValues() {
-        HttpSessionImpl httpSession = new HttpSessionImpl(new ServletContextImpl());
-        httpSession.putValue("attr1", "value1");
-        assertEquals(1, httpSession.getValueNames().length);
-        assertEquals("value1", httpSession.getValue("attr1"));
-        httpSession.removeValue("attr1");
-        assertEquals(0, httpSession.getValueNames().length);
-    }
-
     @Test
     public void testInvalidate() {
         HttpSessionImpl httpSession = new HttpSessionImpl(new ServletContextImpl());
diff --git a/src/test/java/org/apache/sling/api/request/builder/impl/ServletContextImplTest.java b/src/test/java/org/apache/sling/api/request/builder/impl/ServletContextImplTest.java
index a256627..0de20c3 100644
--- a/src/test/java/org/apache/sling/api/request/builder/impl/ServletContextImplTest.java
+++ b/src/test/java/org/apache/sling/api/request/builder/impl/ServletContextImplTest.java
@@ -24,16 +24,16 @@ import static org.junit.Assert.fail;
 import java.io.IOException;
 import java.util.EventListener;
 
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServlet;
-
 import org.junit.Test;
 
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServlet;
+
 public class ServletContextImplTest {
 
     @Test public void testContext() throws ServletException {
@@ -100,22 +100,10 @@ public class ServletContextImplTest {
             context.getServerInfo();
             fail();
         } catch ( final UnsupportedOperationException expected) {}
-        try {
-            context.getServlet("path");
-            fail();
-        } catch ( final UnsupportedOperationException expected) {}
         try {
             context.getServletContextName();
             fail();
         } catch ( final UnsupportedOperationException expected) {}
-        try {
-            context.getServletNames();
-            fail();
-        } catch ( final UnsupportedOperationException expected) {}
-        try {
-            context.getServlets();
-            fail();
-        } catch ( final UnsupportedOperationException expected) {}
         try {
             context.log("msg");
             fail();
@@ -124,10 +112,6 @@ public class ServletContextImplTest {
             context.log("msg", new Exception());
             fail();
         } catch ( final UnsupportedOperationException expected) {}
-        try {
-            context.log(new Exception(), "msg");
-            fail();
-        } catch ( final UnsupportedOperationException expected) {}
         try {
             context.removeAttribute("name");
             fail();
@@ -154,7 +138,7 @@ public class ServletContextImplTest {
         } catch ( final UnsupportedOperationException expected) {}
         try {
             context.addServlet("name", new HttpServlet(){
-                
+
             });
             fail();
         } catch ( final UnsupportedOperationException expected) {}
@@ -181,7 +165,7 @@ public class ServletContextImplTest {
                 @Override
                 public void destroy() {
                 }
-                
+
             });
             fail();
         } catch ( final UnsupportedOperationException expected) {}
@@ -231,7 +215,7 @@ public class ServletContextImplTest {
         } catch ( final UnsupportedOperationException expected) {}
         try {
             context.addListener(new EventListener(){
-                
+
             });
             fail();
         } catch ( final UnsupportedOperationException expected) {}
diff --git a/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImplTest.java b/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImplTest.java
index 7d84954..a80006d 100644
--- a/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImplTest.java
+++ b/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImplTest.java
@@ -51,9 +51,11 @@ import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
 
+@Deprecated
 public class SlingHttpServletRequestImplTest {
-    
-    private SlingHttpServletRequestImpl req;
+
+    private SlingHttpServletRequestBuilderImpl builder;
+    private SlingHttpServletRequest req;
 
     private Resource resource;
 
@@ -64,23 +66,23 @@ public class SlingHttpServletRequestImplTest {
         Mockito.when(resource.getPath()).thenReturn("/content/page");
         Mockito.when(resource.getResourceResolver()).thenReturn(resolver);
 
-        this.req = new SlingHttpServletRequestImpl(resource);
+        this.builder = new SlingHttpServletRequestBuilderImpl(resource);
     }
 
     @Test(expected = IllegalStateException.class) public void testCheckLocked() {
-        req.build();
-        req.withExtension("foo");
+        builder.build();
+        builder.withExtension("foo");
     }
 
     @Test public void testGetResource() {
-        req.build();
+        req = builder.build();
         assertEquals(resource, req.getResource());
         assertEquals(resource.getResourceResolver(), req.getResourceResolver());
     }
 
     @Test public void testGetRequestPathInfo() {
-        req.withExtension("html").withSelectors("tidy", "json");
-        req.build();
+        builder.withExtension("html").withSelectors("tidy", "json");
+        req = builder.build();
         assertEquals("html", req.getRequestPathInfo().getExtension());
         assertEquals("/content/page", req.getRequestPathInfo().getResourcePath());
         assertEquals("tidy.json", req.getRequestPathInfo().getSelectorString());
@@ -90,12 +92,11 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testInternalSession() {
-        req.build();
+        req = builder.build();
         assertNull(req.getSession(false));
         final HttpSession s = req.getSession();
         assertNotNull(s);
-        assertSame(s, req.getSession(true));
-        assertTrue(s instanceof HttpSessionImpl);
+        assertTrue(s instanceof org.apache.felix.http.javaxwrappers.HttpSessionWrapper);
     }
 
     @Test public void testProvidedSession() {
@@ -105,16 +106,15 @@ public class SlingHttpServletRequestImplTest {
         Mockito.when(outer.getSession(true)).thenReturn(outerSession);
         Mockito.when(outerSession.getId()).thenReturn("provided");
 
-        req.useSessionFrom(outer).build();
+        req = builder.useSessionFrom(outer).build();
         assertNull(req.getSession(false));
         final HttpSession s = req.getSession();
         assertNotNull(s);
-        assertSame(s, req.getSession(true));
         assertEquals("provided", s.getId());
     }
 
     @Test public void testInternalAttributes() {
-        req.build();
+        req = builder.build();
         assertFalse(req.getAttributeNames().hasMoreElements());
         req.setAttribute("a", "b");
         assertEquals("b", req.getAttribute("a"));
@@ -126,8 +126,8 @@ public class SlingHttpServletRequestImplTest {
 
     @Test public void testProvidedAttributes() {
         final SlingHttpServletRequest outer = Mockito.mock(SlingHttpServletRequest.class);
-
-        req.useAttributesFrom(outer).build();
+        Mockito.when(outer.getAttributeNames()).thenReturn(Collections.enumeration(Collections.emptyList()));
+        req = builder.useAttributesFrom(outer).build();
         req.getAttributeNames();
         Mockito.verify(outer, Mockito.atLeastOnce()).getAttributeNames();
         req.getAttribute("foo");
@@ -138,18 +138,18 @@ public class SlingHttpServletRequestImplTest {
         Mockito.verify(outer, Mockito.atLeastOnce()).setAttribute("foo", "bar");
     }
 
-    @Test public void testParameters() {
-        req.withParameter("a", "b");
-        req.withParameter("c", new String[] {"d", "e"});
-        req.withParameters(Collections.singletonMap("f", new String[] {"g"}));
-        req.withParameters(null);
-        req.build();
+    @Test public void testParameters() throws IOException, ServletException {
+        req = builder.withParameter("a", "b")
+            .withParameter("c", new String[] {"d", "e"})
+            .withParameters(Collections.singletonMap("f", new String[] {"g"}))
+            .withParameters(null)
+            .build();
 
         assertEquals("b", req.getParameter("a"));
         assertEquals("d", req.getParameter("c"));
         assertEquals("g", req.getParameter("f"));
         assertNull(req.getParameter("g"));
-    
+
         final Map<String, String[]> params = req.getParameterMap();
         assertEquals(3, params.size());
         assertArrayEquals(new String[] {"b"}, params.get("a"));
@@ -160,7 +160,7 @@ public class SlingHttpServletRequestImplTest {
         assertNotNull(req.getRequestParameter("c"));
         assertNotNull(req.getRequestParameter("f"));
         assertNull(req.getRequestParameter("g"));
-    
+
         assertEquals(1, req.getRequestParameters("a").length);
         assertEquals(2, req.getRequestParameters("c").length);
         assertEquals(1, req.getRequestParameters("f").length);
@@ -174,62 +174,62 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testNoQueryString() {
-        req.build();
+        req = builder.build();
         assertNull(req.getQueryString());
     }
 
     @Test public void testQueryString() {
-        req.withParameter("a", "b");
-        req.withParameter("c", new String[] {"d", "e"});
-        req.withParameters(Collections.singletonMap("f", new String[] {"g"}));
-        req.build();
+        req = builder.withParameter("a", "b")
+            .withParameter("c", new String[] {"d", "e"})
+            .withParameters(Collections.singletonMap("f", new String[] {"g"}))
+            .build();
 
         assertEquals("a=b&c=d&c=e&f=g", req.getQueryString());
     }
 
     @Test public void testLocale() {
-        req.build();
+        req = builder.build();
         assertEquals(Locale.US, req.getLocale());
         assertEquals(Collections.singletonList(Locale.US), Collections.list(req.getLocales()));
     }
 
     @Test public void testGetContextPath() {
-        req.build();
+        req = builder.build();
         assertEquals("", req.getContextPath());
     }
 
     @Test public void testGetScheme() {
-        req.build();
+        req = builder.build();
         assertEquals("http", req.getScheme());
     }
 
     @Test public void testGetServerName() {
-        req.build();
+        req = builder.build();
         assertEquals("localhost", req.getServerName());
     }
 
     @Test public void testGetServerPort() {
-        req.build();
+        req = builder.build();
         assertEquals(80, req.getServerPort());
     }
 
     @Test public void testIsSecure() {
-        req.build();
+        req = builder.build();
         assertFalse(req.isSecure());
     }
 
     @Test public void testDefaultGetMethod() {
-        req.build();
+        req = builder.build();
         assertEquals("GET", req.getMethod());
     }
 
     @Test public void testGetMethod() {
-        req.withRequestMethod("POST").build();
+        req = builder.withRequestMethod("POST").build();
         assertEquals("POST", req.getMethod());
     }
 
     @Test public void testHeaders() {
-        req.build();
+        req = builder.build();
         assertFalse(req.getHeaderNames().hasMoreElements());
         assertEquals(-1, req.getDateHeader("foo"));
         assertEquals(-1, req.getIntHeader("foo"));
@@ -238,31 +238,31 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testCookies() {
-        req.build();
+        req = builder.build();
         assertNull(req.getCookies());
         assertNull(req.getCookie("name"));
     }
 
     @Test public void testGetResourceBundle() {
-        req.build();
+        req = builder.build();
         assertNotNull(req.getResourceBundle(req.getLocale()));
         assertNotNull(req.getResourceBundle("base", req.getLocale()));
     }
 
     @Test public void testGetCharacterEncoding() throws UnsupportedEncodingException {
-        req.build();
+        req = builder.build();
         assertNull(req.getCharacterEncoding());
         req.setCharacterEncoding("UTF-8");
         assertEquals("UTF-8", req.getCharacterEncoding());
     }
 
     @Test public void testDefaultContentType() throws UnsupportedEncodingException {
-        req.build();
+        req = builder.build();
         assertNull(req.getContentType());
     }
 
     @Test public void testContentType() throws UnsupportedEncodingException {
-        req.withContentType("text/text").build();
+        req = builder.withContentType("text/text").build();
         assertEquals("text/text", req.getContentType());
         assertNull(req.getCharacterEncoding());
         req.setCharacterEncoding("UTF-8");
@@ -271,12 +271,12 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testNullContentType() {
-        req.withContentType(null).build();
+        req = builder.withContentType(null).build();
         assertNull("null", req.getContentType());
     }
 
     @Test public void testContentTypeAndCharset() throws UnsupportedEncodingException {
-        req.withContentType("text/text;charset=UTF-16").build();
+        req = builder.withContentType("text/text;charset=UTF-16").build();
         assertEquals("text/text;charset=UTF-16", req.getContentType());
         assertEquals("UTF-16", req.getCharacterEncoding());
         req.setCharacterEncoding("UTF-8");
@@ -285,13 +285,13 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testNoBody() {
-        req.build();
+        req = builder.build();
         assertEquals(0, req.getContentLength());
         assertEquals(0L, req.getContentLengthLong());
     }
 
     @Test public void testBodyReader() throws IOException {
-        req.withBody("body").build();
+        req = builder.withBody("body").build();
         assertEquals(4, req.getContentLength());
         assertEquals(4L, req.getContentLengthLong());
         final Reader r = req.getReader();
@@ -305,7 +305,7 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testBodyInputStream() throws IOException {
-        req.withBody("body").build();
+        req = builder.withBody("body").build();
         assertEquals(4, req.getContentLength());
         assertEquals(4L, req.getContentLengthLong());
         final InputStream in = req.getInputStream();
@@ -320,7 +320,7 @@ public class SlingHttpServletRequestImplTest {
 
     @Test public void testDefaultRequestDispatcher() {
         final Resource rsrc = Mockito.mock(Resource.class);
-        req.build();
+        req = builder.build();
         try {
             req.getRequestDispatcher("/path");
             fail();
@@ -343,7 +343,7 @@ public class SlingHttpServletRequestImplTest {
         final Resource rsrc = Mockito.mock(Resource.class);
         final RequestDispatcherOptions opts = new RequestDispatcherOptions();
         final SlingHttpServletRequest outer = Mockito.mock(SlingHttpServletRequest.class);
-        req.useRequestDispatcherFrom(outer).build();
+        req = builder.useRequestDispatcherFrom(outer).build();
 
         req.getRequestDispatcher("/path");
         Mockito.verify(outer, Mockito.times(1)).getRequestDispatcher("/path");
@@ -356,82 +356,82 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testGetRemoteUser() {
-        req.build();
+        req = builder.build();
         assertNull(req.getRemoteUser());
     }
 
     @Test public void testGetRemoteAddr() {
-        req.build();
+        req = builder.build();
         assertNull(req.getRemoteAddr());
     }
 
     @Test public void testGetRemoteHost() {
-        req.build();
+        req = builder.build();
         assertNull(req.getRemoteHost());
     }
 
     @Test public void testGetRemotePort() {
-        req.build();
+        req = builder.build();
         assertEquals(0, req.getRemotePort());
     }
 
     @Test public void testGetServletPath() {
-        req.build();
+        req = builder.build();
         assertEquals("", req.getServletPath());
     }
 
     @Test public void testGetPathInfo() {
-        req.build();
+        req = builder.build();
         assertEquals("/content/page", req.getPathInfo());
     }
 
     @Test public void testGetRequestURI() {
-        req.build();
+        req = builder.build();
         assertEquals("/content/page", req.getRequestURI());
     }
 
     @Test public void testGetRequestURL() {
-        req.build();
+        req = builder.build();
         assertEquals("http://localhost/content/page", req.getRequestURL().toString());
     }
 
     @Test public void testGetAuthType() {
-        req.build();
+        req = builder.build();
         assertNull(req.getAuthType());
     }
 
     @Test public void getResponseContentType() {
-        req.build();
+        req = builder.build();
         assertNull(req.getResponseContentType());
         assertEquals(Collections.singletonList(null), Collections.list(req.getResponseContentTypes()));
     }
 
     @Test public void testNewGetRequestProgressTracker() {
-        req.build();
+        req = builder.build();
         assertNotNull(req.getRequestProgressTracker());
     }
 
     @Test public void testProvidedGetRequestProgressTracker() {
         final RequestProgressTracker t = Builders.newRequestProgressTracker();
-        req.withRequestProgressTracker(t).build();
+        req = builder.withRequestProgressTracker(t).build();
         assertSame(t, req.getRequestProgressTracker());
     }
 
     @Test public void testProvidedByAttributesGetRequestProgressTracker() {
         // build a request with a tracker set in an attribute first
-        final SlingHttpServletRequest orig = new SlingHttpServletRequestImpl(this.resource);
+        final SlingHttpServletRequest orig = new SlingHttpServletRequestBuilderImpl(this.resource).build();
         final RequestProgressTracker t = Builders.newRequestProgressTracker();
         orig.setAttribute(RequestProgressTracker.class.getName(), t);
 
-        req.useAttributesFrom(orig).build();
+        req = builder.useAttributesFrom(orig).build();
         assertSame(t, req.getRequestProgressTracker());
     }
 
     @Test public void testDefaultServletContext() {
-        req.build();
+        req = builder.build();
         final ServletContext ctx = req.getServletContext();
         assertNotNull(ctx);
-        assertTrue(ctx instanceof ServletContextImpl);
+        assertTrue(ctx instanceof org.apache.felix.http.javaxwrappers.ServletContextWrapper);
     }
 
     @Test public void testProvidedServletContext() {
@@ -439,15 +439,15 @@ public class SlingHttpServletRequestImplTest {
         final ServletContext outerCtx = Mockito.mock(ServletContext.class);
         Mockito.when(outer.getServletContext()).thenReturn(outerCtx);
 
-        req.useServletContextFrom(outer).build();
+        req = builder.useServletContextFrom(outer).build();
         final ServletContext ctx = req.getServletContext();
         assertNotNull(ctx);
         Mockito.verify(outer, Mockito.times(1)).getServletContext();
-        assertFalse(ctx instanceof ServletContextImpl);
+        assertTrue(ctx instanceof org.apache.felix.http.javaxwrappers.ServletContextWrapper);
     }
 
     @Test public void testUnsupportedMethods() throws ServletException, IOException {
-        req.build();
+        req = builder.build();
         try {
             req.getPathTranslated();
             fail();
diff --git a/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImplTest.java b/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImplTest.java
index c7b1bbd..2e214cd 100644
--- a/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImplTest.java
+++ b/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImplTest.java
@@ -34,42 +34,46 @@ import java.util.Locale;
 
 import javax.servlet.http.Cookie;
 
+import org.apache.sling.api.request.builder.SlingHttpServletResponseResult;
 import org.junit.Before;
 import org.junit.Test;
 
+@Deprecated
 public class SlingHttpServletResponseImplTest {
-    
-    private SlingHttpServletResponseImpl res;
+
+    private SlingHttpServletResponseBuilderImpl builder;
+
+    private SlingHttpServletResponseResult res;
 
     @Before
     public void setup() {
-        this.res = new SlingHttpServletResponseImpl();
+        this.builder = new SlingHttpServletResponseBuilderImpl();
     }
 
     @Test(expected = IllegalStateException.class) public void testCheckLocked() {
         try {
-            res.build();
+            res = builder.build();
         } catch ( final IllegalStateException error) {
             fail();
         }
-        res.build();
+        res = builder.build();
     }
 
 
     @Test public void testGetCharacterEncoding() throws UnsupportedEncodingException {
-        res.build();
+        res = builder.build();
         assertNull(res.getCharacterEncoding());
         res.setCharacterEncoding("UTF-8");
         assertEquals("UTF-8", res.getCharacterEncoding());
     }
 
     @Test public void testDefaultContentType() throws UnsupportedEncodingException {
-        res.build();
+        res = builder.build();
         assertNull(res.getContentType());
     }
 
-    @Test public void testContentType() throws UnsupportedEncodingException {
-        res.build();
+    @Test public void testContentType() throws IOException {
+        res = builder.build();
         res.setContentType("text/text");
         assertEquals("text/text", res.getContentType());
         assertNull(res.getCharacterEncoding());
@@ -86,7 +90,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testContentTypeAndCharset() throws UnsupportedEncodingException {
-        res.build();
+        res = builder.build();
         res.setContentType("text/text;charset=UTF-16");
         assertEquals("text/text;charset=UTF-16", res.getContentType());
         assertEquals("UTF-16", res.getCharacterEncoding());
@@ -96,7 +100,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testContentLength() {
-        res.build();
+        res = builder.build();
         assertEquals(-1L, res.getContentLength());
         res.setContentLength(500);
         assertEquals(500L, res.getContentLength());
@@ -105,7 +109,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testSetStatus() {
-        res.build();
+        res = builder.build();
         assertEquals(200, res.getStatus());
         assertNull(res.getStatusMessage());
 
@@ -120,24 +124,24 @@ public class SlingHttpServletResponseImplTest {
         assertFalse(res.isCommitted());
     }
 
-    @Test public void testSendError() {
-        res.build();
+    @Test public void testSendError() throws IOException {
+        res = builder.build();
         res.sendError(500);
         assertEquals(500, res.getStatus());
         assertNull(res.getStatusMessage());
         assertTrue(res.isCommitted());
     }
 
-    @Test public void testSendErrorWithMessage() {
-        res.build();
+    @Test public void testSendErrorWithMessage() throws IOException {
+        res = builder.build();
         res.sendError(500, "msg");
         assertEquals(500, res.getStatus());
         assertEquals("msg", res.getStatusMessage());
         assertTrue(res.isCommitted());
     }
 
-    @Test public void testSendRedirect() {
-        res.build();
+    @Test public void testSendRedirect() throws IOException {
+        res = builder.build();
         res.sendRedirect("/redirect");
         assertEquals(302, res.getStatus());
         assertNull(res.getStatusMessage());
@@ -146,7 +150,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testHeaders() {
-        res.build();
+        res = builder.build();
         assertTrue(res.getHeaderNames().isEmpty());
         res.addDateHeader("date", 50000);
         res.addIntHeader("number", 5);
@@ -169,8 +173,8 @@ public class SlingHttpServletResponseImplTest {
         assertEquals(1, res.getHeaders("name").size());
     }
 
-    @Test public void testGetWriter() {
-        res.build();
+    @Test public void testGetWriter() throws IOException {
+        res = builder.build();
         final PrintWriter writer = res.getWriter();
         writer.write("body");
         assertEquals("body", res.getOutputAsString());
@@ -178,7 +182,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testGetOutputStream() throws IOException {
-        res.build();
+        res = builder.build();
         final OutputStream out = res.getOutputStream();
         out.write("body".getBytes(StandardCharsets.UTF_8));
         assertEquals("body", res.getOutputAsString());
@@ -186,7 +190,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testReset() {
-        res.build();
+        res = builder.build();
         res.setStatus(201);
         res.setContentLength(500);
         res.reset();
@@ -195,7 +199,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testResetBuffer() {
-        res.build();
+        res = builder.build();
         res.setStatus(201);
         res.setContentLength(500);
         res.resetBuffer();
@@ -204,21 +208,21 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testBufferSize() {
-        res.build();
+        res = builder.build();
         assertEquals(8192, res.getBufferSize());
         res.setBufferSize(16384);
         assertEquals(16384, res.getBufferSize());
     }
 
-    @Test public void testFlushBuffer() {
-        res.build();
+    @Test public void testFlushBuffer() throws IOException {
+        res = builder.build();
         assertFalse(res.isCommitted());
         res.flushBuffer();
         assertTrue(res.isCommitted());
     }
 
     @Test public void testCookies() {
-        res.build();
+        res = builder.build();
         assertNull(res.getCookies());
         res.addCookie(new Cookie("name", "value"));
         assertEquals(1, res.getCookies().length);
@@ -227,14 +231,14 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testLocale() {
-        res.build();
+        res = builder.build();
         assertEquals(Locale.US, res.getLocale());
         res.setLocale(Locale.CANADA);
         assertEquals(Locale.CANADA, res.getLocale());
     }
 
     @Test public void testUnsupportedMethods() {
-        res.build();
+        res = builder.build();
         try {
             res.encodeRedirectURL("/url");
             fail();
diff --git a/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImplTest.java b/src/test/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletRequestImplTest.java
similarity index 80%
copy from src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImplTest.java
copy to src/test/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletRequestImplTest.java
index 7d84954..94d54ec 100644
--- a/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletRequestImplTest.java
+++ b/src/test/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletRequestImplTest.java
@@ -36,11 +36,11 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpSession;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpSession;
 
-import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.apache.sling.api.request.RequestDispatcherOptions;
 import org.apache.sling.api.request.RequestParameter;
 import org.apache.sling.api.request.RequestProgressTracker;
@@ -51,9 +51,10 @@ import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
 
-public class SlingHttpServletRequestImplTest {
-    
-    private SlingHttpServletRequestImpl req;
+public class SlingJakartaHttpServletRequestImplTest {
+
+    private SlingHttpServletRequestBuilderImpl builder;
+    private SlingJakartaHttpServletRequest req;
 
     private Resource resource;
 
@@ -64,23 +65,23 @@ public class SlingHttpServletRequestImplTest {
         Mockito.when(resource.getPath()).thenReturn("/content/page");
         Mockito.when(resource.getResourceResolver()).thenReturn(resolver);
 
-        this.req = new SlingHttpServletRequestImpl(resource);
+        this.builder = new SlingHttpServletRequestBuilderImpl(resource);
     }
 
     @Test(expected = IllegalStateException.class) public void testCheckLocked() {
-        req.build();
-        req.withExtension("foo");
+        builder.buildJakartaRequest();
+        builder.withExtension("foo");
     }
 
     @Test public void testGetResource() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals(resource, req.getResource());
         assertEquals(resource.getResourceResolver(), req.getResourceResolver());
     }
 
     @Test public void testGetRequestPathInfo() {
-        req.withExtension("html").withSelectors("tidy", "json");
-        req.build();
+        builder.withExtension("html").withSelectors("tidy", "json");
+        req = builder.buildJakartaRequest();
         assertEquals("html", req.getRequestPathInfo().getExtension());
         assertEquals("/content/page", req.getRequestPathInfo().getResourcePath());
         assertEquals("tidy.json", req.getRequestPathInfo().getSelectorString());
@@ -90,7 +91,7 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testInternalSession() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getSession(false));
         final HttpSession s = req.getSession();
         assertNotNull(s);
@@ -99,13 +100,13 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testProvidedSession() {
-        final SlingHttpServletRequest outer = Mockito.mock(SlingHttpServletRequest.class);
+        final SlingJakartaHttpServletRequest outer = Mockito.mock(SlingJakartaHttpServletRequest.class);
         final HttpSession outerSession = Mockito.mock(HttpSession.class);
         Mockito.when(outer.getSession()).thenReturn(outerSession);
         Mockito.when(outer.getSession(true)).thenReturn(outerSession);
         Mockito.when(outerSession.getId()).thenReturn("provided");
 
-        req.useSessionFrom(outer).build();
+        req = builder.useSessionFrom(outer).buildJakartaRequest();
         assertNull(req.getSession(false));
         final HttpSession s = req.getSession();
         assertNotNull(s);
@@ -114,7 +115,7 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testInternalAttributes() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertFalse(req.getAttributeNames().hasMoreElements());
         req.setAttribute("a", "b");
         assertEquals("b", req.getAttribute("a"));
@@ -125,9 +126,9 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testProvidedAttributes() {
-        final SlingHttpServletRequest outer = Mockito.mock(SlingHttpServletRequest.class);
-
-        req.useAttributesFrom(outer).build();
+        final SlingJakartaHttpServletRequest outer = Mockito.mock(SlingJakartaHttpServletRequest.class);
+        Mockito.when(outer.getAttributeNames()).thenReturn(Collections.enumeration(Collections.emptyList()));
+        req = builder.useAttributesFrom(outer).buildJakartaRequest();
         req.getAttributeNames();
         Mockito.verify(outer, Mockito.atLeastOnce()).getAttributeNames();
         req.getAttribute("foo");
@@ -138,18 +139,18 @@ public class SlingHttpServletRequestImplTest {
         Mockito.verify(outer, Mockito.atLeastOnce()).setAttribute("foo", "bar");
     }
 
-    @Test public void testParameters() {
-        req.withParameter("a", "b");
-        req.withParameter("c", new String[] {"d", "e"});
-        req.withParameters(Collections.singletonMap("f", new String[] {"g"}));
-        req.withParameters(null);
-        req.build();
+    @Test public void testParameters() throws IOException, ServletException {
+        req = builder.withParameter("a", "b")
+            .withParameter("c", new String[] {"d", "e"})
+            .withParameters(Collections.singletonMap("f", new String[] {"g"}))
+            .withParameters(null)
+            .buildJakartaRequest();
 
         assertEquals("b", req.getParameter("a"));
         assertEquals("d", req.getParameter("c"));
         assertEquals("g", req.getParameter("f"));
         assertNull(req.getParameter("g"));
-    
+
         final Map<String, String[]> params = req.getParameterMap();
         assertEquals(3, params.size());
         assertArrayEquals(new String[] {"b"}, params.get("a"));
@@ -160,7 +161,7 @@ public class SlingHttpServletRequestImplTest {
         assertNotNull(req.getRequestParameter("c"));
         assertNotNull(req.getRequestParameter("f"));
         assertNull(req.getRequestParameter("g"));
-    
+
         assertEquals(1, req.getRequestParameters("a").length);
         assertEquals(2, req.getRequestParameters("c").length);
         assertEquals(1, req.getRequestParameters("f").length);
@@ -174,62 +175,62 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testNoQueryString() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getQueryString());
     }
 
     @Test public void testQueryString() {
-        req.withParameter("a", "b");
-        req.withParameter("c", new String[] {"d", "e"});
-        req.withParameters(Collections.singletonMap("f", new String[] {"g"}));
-        req.build();
+        req = builder.withParameter("a", "b")
+            .withParameter("c", new String[] {"d", "e"})
+            .withParameters(Collections.singletonMap("f", new String[] {"g"}))
+            .buildJakartaRequest();
 
         assertEquals("a=b&c=d&c=e&f=g", req.getQueryString());
     }
 
     @Test public void testLocale() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals(Locale.US, req.getLocale());
         assertEquals(Collections.singletonList(Locale.US), Collections.list(req.getLocales()));
     }
 
     @Test public void testGetContextPath() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals("", req.getContextPath());
     }
 
     @Test public void testGetScheme() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals("http", req.getScheme());
     }
 
     @Test public void testGetServerName() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals("localhost", req.getServerName());
     }
 
     @Test public void testGetServerPort() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals(80, req.getServerPort());
     }
 
     @Test public void testIsSecure() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertFalse(req.isSecure());
     }
 
     @Test public void testDefaultGetMethod() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals("GET", req.getMethod());
     }
 
     @Test public void testGetMethod() {
-        req.withRequestMethod("POST").build();
+        req = builder.withRequestMethod("POST").buildJakartaRequest();
         assertEquals("POST", req.getMethod());
     }
 
     @Test public void testHeaders() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertFalse(req.getHeaderNames().hasMoreElements());
         assertEquals(-1, req.getDateHeader("foo"));
         assertEquals(-1, req.getIntHeader("foo"));
@@ -238,31 +239,31 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testCookies() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getCookies());
         assertNull(req.getCookie("name"));
     }
 
     @Test public void testGetResourceBundle() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNotNull(req.getResourceBundle(req.getLocale()));
         assertNotNull(req.getResourceBundle("base", req.getLocale()));
     }
 
     @Test public void testGetCharacterEncoding() throws UnsupportedEncodingException {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getCharacterEncoding());
         req.setCharacterEncoding("UTF-8");
         assertEquals("UTF-8", req.getCharacterEncoding());
     }
 
     @Test public void testDefaultContentType() throws UnsupportedEncodingException {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getContentType());
     }
 
     @Test public void testContentType() throws UnsupportedEncodingException {
-        req.withContentType("text/text").build();
+        req = builder.withContentType("text/text").buildJakartaRequest();
         assertEquals("text/text", req.getContentType());
         assertNull(req.getCharacterEncoding());
         req.setCharacterEncoding("UTF-8");
@@ -271,12 +272,12 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testNullContentType() {
-        req.withContentType(null).build();
+        req = builder.withContentType(null).buildJakartaRequest();
         assertNull("null", req.getContentType());
     }
 
     @Test public void testContentTypeAndCharset() throws UnsupportedEncodingException {
-        req.withContentType("text/text;charset=UTF-16").build();
+        req = builder.withContentType("text/text;charset=UTF-16").buildJakartaRequest();
         assertEquals("text/text;charset=UTF-16", req.getContentType());
         assertEquals("UTF-16", req.getCharacterEncoding());
         req.setCharacterEncoding("UTF-8");
@@ -285,13 +286,13 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testNoBody() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals(0, req.getContentLength());
         assertEquals(0L, req.getContentLengthLong());
     }
 
     @Test public void testBodyReader() throws IOException {
-        req.withBody("body").build();
+        req = builder.withBody("body").buildJakartaRequest();
         assertEquals(4, req.getContentLength());
         assertEquals(4L, req.getContentLengthLong());
         final Reader r = req.getReader();
@@ -305,7 +306,7 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testBodyInputStream() throws IOException {
-        req.withBody("body").build();
+        req = builder.withBody("body").buildJakartaRequest();
         assertEquals(4, req.getContentLength());
         assertEquals(4L, req.getContentLengthLong());
         final InputStream in = req.getInputStream();
@@ -320,7 +321,7 @@ public class SlingHttpServletRequestImplTest {
 
     @Test public void testDefaultRequestDispatcher() {
         final Resource rsrc = Mockito.mock(Resource.class);
-        req.build();
+        req = builder.buildJakartaRequest();
         try {
             req.getRequestDispatcher("/path");
             fail();
@@ -342,8 +343,8 @@ public class SlingHttpServletRequestImplTest {
     @Test public void testProvidedRequestDispatcher() {
         final Resource rsrc = Mockito.mock(Resource.class);
         final RequestDispatcherOptions opts = new RequestDispatcherOptions();
-        final SlingHttpServletRequest outer = Mockito.mock(SlingHttpServletRequest.class);
-        req.useRequestDispatcherFrom(outer).build();
+        final SlingJakartaHttpServletRequest outer = Mockito.mock(SlingJakartaHttpServletRequest.class);
+        req = builder.useRequestDispatcherFrom(outer).buildJakartaRequest();
 
         req.getRequestDispatcher("/path");
         Mockito.verify(outer, Mockito.times(1)).getRequestDispatcher("/path");
@@ -356,90 +357,90 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testGetRemoteUser() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getRemoteUser());
     }
 
     @Test public void testGetRemoteAddr() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getRemoteAddr());
     }
 
     @Test public void testGetRemoteHost() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getRemoteHost());
     }
 
     @Test public void testGetRemotePort() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals(0, req.getRemotePort());
     }
 
     @Test public void testGetServletPath() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals("", req.getServletPath());
     }
 
     @Test public void testGetPathInfo() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals("/content/page", req.getPathInfo());
     }
 
     @Test public void testGetRequestURI() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals("/content/page", req.getRequestURI());
     }
 
     @Test public void testGetRequestURL() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertEquals("http://localhost/content/page", req.getRequestURL().toString());
     }
 
     @Test public void testGetAuthType() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getAuthType());
     }
 
     @Test public void getResponseContentType() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNull(req.getResponseContentType());
         assertEquals(Collections.singletonList(null), Collections.list(req.getResponseContentTypes()));
     }
 
     @Test public void testNewGetRequestProgressTracker() {
-        req.build();
+        req = builder.buildJakartaRequest();
         assertNotNull(req.getRequestProgressTracker());
     }
 
     @Test public void testProvidedGetRequestProgressTracker() {
         final RequestProgressTracker t = Builders.newRequestProgressTracker();
-        req.withRequestProgressTracker(t).build();
+        req = builder.withRequestProgressTracker(t).buildJakartaRequest();
         assertSame(t, req.getRequestProgressTracker());
     }
 
     @Test public void testProvidedByAttributesGetRequestProgressTracker() {
         // build a request with a tracker set in an attribute first
-        final SlingHttpServletRequest orig = new SlingHttpServletRequestImpl(this.resource);
+        final SlingJakartaHttpServletRequest orig = new SlingHttpServletRequestBuilderImpl(this.resource).buildJakartaRequest();
         final RequestProgressTracker t = Builders.newRequestProgressTracker();
         orig.setAttribute(RequestProgressTracker.class.getName(), t);
 
-        req.useAttributesFrom(orig).build();
+        req = builder.useAttributesFrom(orig).buildJakartaRequest();
         assertSame(t, req.getRequestProgressTracker());
     }
 
     @Test public void testDefaultServletContext() {
-        req.build();
+        req = builder.buildJakartaRequest();
         final ServletContext ctx = req.getServletContext();
         assertNotNull(ctx);
         assertTrue(ctx instanceof ServletContextImpl);
     }
 
     @Test public void testProvidedServletContext() {
-        final SlingHttpServletRequest outer = Mockito.mock(SlingHttpServletRequest.class);
+        final SlingJakartaHttpServletRequest outer = Mockito.mock(SlingJakartaHttpServletRequest.class);
         final ServletContext outerCtx = Mockito.mock(ServletContext.class);
         Mockito.when(outer.getServletContext()).thenReturn(outerCtx);
 
-        req.useServletContextFrom(outer).build();
+        req = builder.useServletContextFrom(outer).buildJakartaRequest();
         final ServletContext ctx = req.getServletContext();
         assertNotNull(ctx);
         Mockito.verify(outer, Mockito.times(1)).getServletContext();
@@ -447,7 +448,7 @@ public class SlingHttpServletRequestImplTest {
     }
 
     @Test public void testUnsupportedMethods() throws ServletException, IOException {
-        req.build();
+        req = builder.buildJakartaRequest();
         try {
             req.getPathTranslated();
             fail();
@@ -468,10 +469,6 @@ public class SlingHttpServletRequestImplTest {
             req.isRequestedSessionIdFromURL();
             fail();
         } catch ( final UnsupportedOperationException expected) {}
-        try {
-            req.isRequestedSessionIdFromUrl();
-            fail();
-        } catch ( final UnsupportedOperationException expected) {}
         try {
             req.isRequestedSessionIdValid();
             fail();
@@ -492,10 +489,6 @@ public class SlingHttpServletRequestImplTest {
             req.getLocalPort();
             fail();
         } catch ( final UnsupportedOperationException expected) {}
-        try {
-            req.getRealPath("path");
-            fail();
-        } catch ( final UnsupportedOperationException expected) {}
         try {
             req.authenticate(null);
             fail();
diff --git a/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImplTest.java b/src/test/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletResponseImplTest.java
similarity index 79%
copy from src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImplTest.java
copy to src/test/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletResponseImplTest.java
index c7b1bbd..a50b6eb 100644
--- a/src/test/java/org/apache/sling/api/request/builder/impl/SlingHttpServletResponseImplTest.java
+++ b/src/test/java/org/apache/sling/api/request/builder/impl/SlingJakartaHttpServletResponseImplTest.java
@@ -32,44 +32,47 @@ import java.io.UnsupportedEncodingException;
 import java.nio.charset.StandardCharsets;
 import java.util.Locale;
 
-import javax.servlet.http.Cookie;
+import jakarta.servlet.http.Cookie;
 
+import org.apache.sling.api.request.builder.SlingJakartaHttpServletResponseResult;
 import org.junit.Before;
 import org.junit.Test;
 
-public class SlingHttpServletResponseImplTest {
-    
-    private SlingHttpServletResponseImpl res;
+public class SlingJakartaHttpServletResponseImplTest {
+
+    private SlingHttpServletResponseBuilderImpl builder;
+
+    private SlingJakartaHttpServletResponseResult res;
 
     @Before
     public void setup() {
-        this.res = new SlingHttpServletResponseImpl();
+        this.builder = new SlingHttpServletResponseBuilderImpl();
     }
 
     @Test(expected = IllegalStateException.class) public void testCheckLocked() {
         try {
-            res.build();
+            res = builder.buildJakartaResponseResult();
         } catch ( final IllegalStateException error) {
             fail();
         }
-        res.build();
+        res = builder.buildJakartaResponseResult();
     }
 
 
     @Test public void testGetCharacterEncoding() throws UnsupportedEncodingException {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         assertNull(res.getCharacterEncoding());
         res.setCharacterEncoding("UTF-8");
         assertEquals("UTF-8", res.getCharacterEncoding());
     }
 
     @Test public void testDefaultContentType() throws UnsupportedEncodingException {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         assertNull(res.getContentType());
     }
 
-    @Test public void testContentType() throws UnsupportedEncodingException {
-        res.build();
+    @Test public void testContentType() throws IOException {
+        res = builder.buildJakartaResponseResult();
         res.setContentType("text/text");
         assertEquals("text/text", res.getContentType());
         assertNull(res.getCharacterEncoding());
@@ -86,7 +89,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testContentTypeAndCharset() throws UnsupportedEncodingException {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         res.setContentType("text/text;charset=UTF-16");
         assertEquals("text/text;charset=UTF-16", res.getContentType());
         assertEquals("UTF-16", res.getCharacterEncoding());
@@ -96,7 +99,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testContentLength() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         assertEquals(-1L, res.getContentLength());
         res.setContentLength(500);
         assertEquals(500L, res.getContentLength());
@@ -105,7 +108,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testSetStatus() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         assertEquals(200, res.getStatus());
         assertNull(res.getStatusMessage());
 
@@ -113,31 +116,27 @@ public class SlingHttpServletResponseImplTest {
         assertEquals(201, res.getStatus());
         assertNull(res.getStatusMessage());
 
-        res.setStatus(202, "msg");
-        assertEquals(202, res.getStatus());
-        assertEquals("msg", res.getStatusMessage());
-
         assertFalse(res.isCommitted());
     }
 
-    @Test public void testSendError() {
-        res.build();
+    @Test public void testSendError() throws IOException {
+        res = builder.buildJakartaResponseResult();
         res.sendError(500);
         assertEquals(500, res.getStatus());
         assertNull(res.getStatusMessage());
         assertTrue(res.isCommitted());
     }
 
-    @Test public void testSendErrorWithMessage() {
-        res.build();
+    @Test public void testSendErrorWithMessage() throws IOException {
+        res = builder.buildJakartaResponseResult();
         res.sendError(500, "msg");
         assertEquals(500, res.getStatus());
         assertEquals("msg", res.getStatusMessage());
         assertTrue(res.isCommitted());
     }
 
-    @Test public void testSendRedirect() {
-        res.build();
+    @Test public void testSendRedirect() throws IOException {
+        res = builder.buildJakartaResponseResult();
         res.sendRedirect("/redirect");
         assertEquals(302, res.getStatus());
         assertNull(res.getStatusMessage());
@@ -146,7 +145,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testHeaders() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         assertTrue(res.getHeaderNames().isEmpty());
         res.addDateHeader("date", 50000);
         res.addIntHeader("number", 5);
@@ -169,8 +168,8 @@ public class SlingHttpServletResponseImplTest {
         assertEquals(1, res.getHeaders("name").size());
     }
 
-    @Test public void testGetWriter() {
-        res.build();
+    @Test public void testGetWriter() throws IOException {
+        res = builder.buildJakartaResponseResult();
         final PrintWriter writer = res.getWriter();
         writer.write("body");
         assertEquals("body", res.getOutputAsString());
@@ -178,7 +177,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testGetOutputStream() throws IOException {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         final OutputStream out = res.getOutputStream();
         out.write("body".getBytes(StandardCharsets.UTF_8));
         assertEquals("body", res.getOutputAsString());
@@ -186,7 +185,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testReset() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         res.setStatus(201);
         res.setContentLength(500);
         res.reset();
@@ -195,7 +194,7 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testResetBuffer() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         res.setStatus(201);
         res.setContentLength(500);
         res.resetBuffer();
@@ -204,21 +203,21 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testBufferSize() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         assertEquals(8192, res.getBufferSize());
         res.setBufferSize(16384);
         assertEquals(16384, res.getBufferSize());
     }
 
-    @Test public void testFlushBuffer() {
-        res.build();
+    @Test public void testFlushBuffer() throws IOException {
+        res = builder.buildJakartaResponseResult();
         assertFalse(res.isCommitted());
         res.flushBuffer();
         assertTrue(res.isCommitted());
     }
 
     @Test public void testCookies() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         assertNull(res.getCookies());
         res.addCookie(new Cookie("name", "value"));
         assertEquals(1, res.getCookies().length);
@@ -227,29 +226,21 @@ public class SlingHttpServletResponseImplTest {
     }
 
     @Test public void testLocale() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         assertEquals(Locale.US, res.getLocale());
         res.setLocale(Locale.CANADA);
         assertEquals(Locale.CANADA, res.getLocale());
     }
 
     @Test public void testUnsupportedMethods() {
-        res.build();
+        res = builder.buildJakartaResponseResult();
         try {
             res.encodeRedirectURL("/url");
             fail();
         } catch ( final UnsupportedOperationException expected) {}
-        try {
-            res.encodeRedirectUrl("/url");
-            fail();
-        } catch ( final UnsupportedOperationException expected) {}
         try {
             res.encodeURL("/url");
             fail();
         } catch ( final UnsupportedOperationException expected) {}
-        try {
-            res.encodeUrl("/url");
-            fail();
-        } catch ( final UnsupportedOperationException expected) {}
     }
 }
diff --git a/src/test/java/org/apache/sling/api/request/header/MediaRangeListTest.java b/src/test/java/org/apache/sling/api/request/header/JakartaMediaRangeListTest.java
similarity index 70%
copy from src/test/java/org/apache/sling/api/request/header/MediaRangeListTest.java
copy to src/test/java/org/apache/sling/api/request/header/JakartaMediaRangeListTest.java
index e302f08..e961247 100644
--- a/src/test/java/org/apache/sling/api/request/header/MediaRangeListTest.java
+++ b/src/test/java/org/apache/sling/api/request/header/JakartaMediaRangeListTest.java
@@ -16,17 +16,17 @@
  */
 package org.apache.sling.api.request.header;
 
-import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.mockito.Mockito;
 
 import junit.framework.TestCase;
 
-public class MediaRangeListTest extends TestCase {
-    protected MediaRangeList rangeList;
+public class JakartaMediaRangeListTest extends TestCase {
+    protected JakartaMediaRangeList rangeList;
 
     public void setUp() throws Exception {
         super.setUp();
-        rangeList = new MediaRangeList("text/*;q=0.3, text/html;q=0.7, text/html;level=1,\n" +
+        rangeList = new JakartaMediaRangeList("text/*;q=0.3, text/html;q=0.7, text/html;level=1,\n" +
                 "               text/html;level=2;q=0.4, */*;q=0.5");
     }
 
@@ -41,15 +41,15 @@ public class MediaRangeListTest extends TestCase {
     }
 
     public void testPreferJson() {
-        MediaRangeList rangeList = new MediaRangeList("text/html;q=0.8, application/json");
+        JakartaMediaRangeList rangeList = new JakartaMediaRangeList("text/html;q=0.8, application/json");
         assertEquals("application/json", rangeList.prefer("text/html", "application/json"));
     }
 
     public void testHttpEquivParam() {
-        SlingHttpServletRequest req = Mockito.mock(SlingHttpServletRequest.class);
-        Mockito.when(req.getHeader(MediaRangeList.HEADER_ACCEPT)).thenReturn("text/plain");
-        Mockito.when(req.getParameter(MediaRangeList.PARAM_ACCEPT)).thenReturn("text/html");
-        MediaRangeList rangeList = new MediaRangeList(req);
+        SlingJakartaHttpServletRequest req = Mockito.mock(SlingJakartaHttpServletRequest.class);
+        Mockito.when(req.getHeader(JakartaMediaRangeList.HEADER_ACCEPT)).thenReturn("text/plain");
+        Mockito.when(req.getParameter(JakartaMediaRangeList.PARAM_ACCEPT)).thenReturn("text/html");
+        JakartaMediaRangeList rangeList = new JakartaMediaRangeList(req);
         assertTrue("Did not contain media type from query param", rangeList.contains("text/html"));
         assertFalse("Contained media type from overridden Accept header", rangeList.contains("text/plain"));
     }
@@ -59,9 +59,9 @@ public class MediaRangeListTest extends TestCase {
         //See acceptHeader at http://hg.openjdk.java.net/jdk6/jdk6-gate/jdk/file/tip/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
         //To support such case the MediaRange parser has to be made bit linient
         final String invalidHeader = "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
-        SlingHttpServletRequest req = Mockito.mock(SlingHttpServletRequest.class);
-        Mockito.when(req.getHeader(MediaRangeList.HEADER_ACCEPT)).thenReturn(invalidHeader);
-        MediaRangeList rangeList = new MediaRangeList(req);
+        SlingJakartaHttpServletRequest req = Mockito.mock(SlingJakartaHttpServletRequest.class);
+        Mockito.when(req.getHeader(JakartaMediaRangeList.HEADER_ACCEPT)).thenReturn(invalidHeader);
+        JakartaMediaRangeList rangeList = new JakartaMediaRangeList(req);
         assertTrue("Did not contain media type from query param", rangeList.contains("text/html"));
     }
 }
diff --git a/src/test/java/org/apache/sling/api/request/header/MediaRangeListTest.java b/src/test/java/org/apache/sling/api/request/header/MediaRangeListTest.java
index e302f08..1ff72d5 100644
--- a/src/test/java/org/apache/sling/api/request/header/MediaRangeListTest.java
+++ b/src/test/java/org/apache/sling/api/request/header/MediaRangeListTest.java
@@ -21,6 +21,7 @@ import org.mockito.Mockito;
 
 import junit.framework.TestCase;
 
+@SuppressWarnings("deprecation")
 public class MediaRangeListTest extends TestCase {
     protected MediaRangeList rangeList;
 
diff --git a/src/test/java/org/apache/sling/api/resource/ResourceUtilTest.java b/src/test/java/org/apache/sling/api/resource/ResourceUtilTest.java
index 951164a..4d54134 100644
--- a/src/test/java/org/apache/sling/api/resource/ResourceUtilTest.java
+++ b/src/test/java/org/apache/sling/api/resource/ResourceUtilTest.java
@@ -272,7 +272,7 @@ public class ResourceUtilTest {
         final Resource c = mock(Resource.class, "c");
         final List<Resource> l = new ArrayList<Resource>();
         l.add(a); l.add(b); l.add(c);
-        
+
         when(a.adaptTo(List.class)).thenReturn(new ArrayList<Object>());
         when(b.adaptTo(List.class)).thenReturn(new ArrayList<Object>());
         when(c.adaptTo(List.class)).thenReturn(null);
@@ -280,11 +280,11 @@ public class ResourceUtilTest {
         when(b.adaptTo(Map.class)).thenReturn(new HashMap<Object, Object>());
         when(c.adaptTo(Map.class)).thenReturn(new HashMap<Object, Object>());
         when(a.adaptTo(Long.class)).thenReturn(null);
-        when(b.adaptTo(Long.class)).thenReturn(new Long(1));
-        when(c.adaptTo(Long.class)).thenReturn(new Long(2));
-        when(a.adaptTo(Boolean.class)).thenReturn(new Boolean(true));
+        when(b.adaptTo(Long.class)).thenReturn(1L);
+        when(c.adaptTo(Long.class)).thenReturn(2L);
+        when(a.adaptTo(Boolean.class)).thenReturn(true);
         when(b.adaptTo(Boolean.class)).thenReturn(null);
-        when(c.adaptTo(Boolean.class)).thenReturn(new Boolean(false));
+        when(c.adaptTo(Boolean.class)).thenReturn(false);
         when(a.adaptTo(String.class)).thenReturn(null);
         when(b.adaptTo(String.class)).thenReturn(null);
         when(c.adaptTo(String.class)).thenReturn(null);
diff --git a/src/test/java/org/apache/sling/api/uri/SlingUriBuilderTest.java b/src/test/java/org/apache/sling/api/uri/SlingUriBuilderTest.java
index 8e3cee8..f5241a5 100644
--- a/src/test/java/org/apache/sling/api/uri/SlingUriBuilderTest.java
+++ b/src/test/java/org/apache/sling/api/uri/SlingUriBuilderTest.java
@@ -30,6 +30,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingJakartaHttpServletRequest;
 import org.apache.sling.api.request.RequestPathInfo;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
@@ -40,11 +41,15 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 
 @RunWith(MockitoJUnitRunner.class)
+@SuppressWarnings("deprecation")
 public class SlingUriBuilderTest {
 
     @Mock
     SlingHttpServletRequest request;
 
+    @Mock
+    SlingJakartaHttpServletRequest jakartaRequest;
+
     @Mock
     RequestPathInfo requestPathInfo;
 
@@ -57,6 +62,7 @@ public class SlingUriBuilderTest {
     @Before
     public void before() {
         when(request.getRequestPathInfo()).thenReturn(requestPathInfo);
+        when(jakartaRequest.getRequestPathInfo()).thenReturn(requestPathInfo);
     }
 
     @Test
@@ -90,7 +96,6 @@ public class SlingUriBuilderTest {
 
     @Test
     public void testCreateFromRequest() {
-
         // to satisfy that the return of this call is @NotNull
         when(request.getResourceResolver()).thenReturn(resourceResolver);
         when(resourceResolver.map(request, "/test/to/path")).thenReturn("/test/to/path");
@@ -109,6 +114,26 @@ public class SlingUriBuilderTest {
         assertEquals("https://example.com/test/to/path.sel1.sel2.html/suffix/path?par1=val1", testUri.toString());
     }
 
+    @Test
+    public void testCreateFromRequestJakarta() {
+        // to satisfy that the return of this call is @NotNull
+        when(jakartaRequest.getResourceResolver()).thenReturn(resourceResolver);
+        when(resourceResolver.map(jakartaRequest, "/test/to/path")).thenReturn("/test/to/path");
+
+        when(jakartaRequest.getScheme()).thenReturn("https");
+        when(jakartaRequest.getServerName()).thenReturn("example.com");
+        when(jakartaRequest.getServerPort()).thenReturn(443);
+        when(jakartaRequest.getQueryString()).thenReturn("par1=val1");
+        when(requestPathInfo.getResourcePath()).thenReturn("/test/to/path");
+        when(requestPathInfo.getSelectors()).thenReturn(new String[] { "sel1", "sel2" });
+        when(requestPathInfo.getExtension()).thenReturn("html");
+        when(requestPathInfo.getSuffix()).thenReturn("/suffix/path");
+
+        SlingUri testUri = SlingUriBuilder.createFrom(jakartaRequest).build();
+
+        assertEquals("https://example.com/test/to/path.sel1.sel2.html/suffix/path?par1=val1", testUri.toString());
+    }
+
     /**
      * SLING-11347 verify that mapped path remains mapped in the new SlingUri
      */
@@ -136,6 +161,33 @@ public class SlingUriBuilderTest {
         assertEquals("https://example.com/test/to/path.sel1.sel2.html/suffix/path?par1=val1", testUri.toString());
     }
 
+    /**
+     * SLING-11347 verify that mapped path remains mapped in the new SlingUri
+     */
+    @Test
+    public void testCreateFromRequestWithMappedPathJakarta() {
+
+        when(jakartaRequest.getResourceResolver()).thenReturn(resourceResolver);
+        // simulate the resourcePath not already under /content so ResourceResolver#resolve would
+        //   change the result
+        when(jakartaRequest.getPathInfo()).thenReturn("/test/to/path");
+        when(resourceResolver.map(jakartaRequest, "/content/test/to/path")).thenReturn("/test/to/path");
+
+        when(jakartaRequest.getScheme()).thenReturn("https");
+        when(jakartaRequest.getServerName()).thenReturn("example.com");
+        when(jakartaRequest.getServerPort()).thenReturn(443);
+        when(jakartaRequest.getQueryString()).thenReturn("par1=val1");
+        // simulate the ResourceResolver#resolve switching to a resource under /content
+        when(requestPathInfo.getResourcePath()).thenReturn("/content/test/to/path");
+        when(requestPathInfo.getSelectors()).thenReturn(new String[] { "sel1", "sel2" });
+        when(requestPathInfo.getExtension()).thenReturn("html");
+        when(requestPathInfo.getSuffix()).thenReturn("/suffix/path");
+
+        SlingUri testUri = SlingUriBuilder.createFrom(jakartaRequest).build();
+
+        assertEquals("https://example.com/test/to/path.sel1.sel2.html/suffix/path?par1=val1", testUri.toString());
+    }
+
     /**
      * SLING-11347 verify that not-mapped path remains not-mapped in the new SlingUri
      */
@@ -162,6 +214,32 @@ public class SlingUriBuilderTest {
         assertEquals("https://example.com/content/test/to/path.sel1.sel2.html/suffix/path?par1=val1", testUri.toString());
     }
 
+    /**
+     * SLING-11347 verify that not-mapped path remains not-mapped in the new SlingUri
+     */
+    @Test
+    public void testCreateFromRequestWithNotMappedPathJakarta() {
+
+        when(jakartaRequest.getResourceResolver()).thenReturn(resourceResolver);
+        // simulate the resourcePath already under /content so ResourceResolver#resolve would
+        //   not change the result
+        when(jakartaRequest.getPathInfo()).thenReturn("/content/test/to/path");
+        when(resourceResolver.map(jakartaRequest, "/content/test/to/path")).thenReturn("/test/to/path");
+
+        when(jakartaRequest.getScheme()).thenReturn("https");
+        when(jakartaRequest.getServerName()).thenReturn("example.com");
+        when(jakartaRequest.getServerPort()).thenReturn(443);
+        when(jakartaRequest.getQueryString()).thenReturn("par1=val1");
+        when(requestPathInfo.getResourcePath()).thenReturn("/content/test/to/path");
+        when(requestPathInfo.getSelectors()).thenReturn(new String[] { "sel1", "sel2" });
+        when(requestPathInfo.getExtension()).thenReturn("html");
+        when(requestPathInfo.getSuffix()).thenReturn("/suffix/path");
+
+        SlingUri testUri = SlingUriBuilder.createFrom(jakartaRequest).build();
+
+        assertEquals("https://example.com/content/test/to/path.sel1.sel2.html/suffix/path?par1=val1", testUri.toString());
+    }
+
     @Test
     public void testCreateFromResource() {
 
@@ -207,6 +285,27 @@ public class SlingUriBuilderTest {
         assertEquals("https://example.com/test/to/path.sel1.sel2.html/suffix/path?par1=val1", testUri.toString());
     }
 
+    @Test
+    public void testCreateFromPathJakarta() {
+
+        // to satisfy that the return of this call is @NotNull
+        when(jakartaRequest.getResourceResolver()).thenReturn(resourceResolver);
+        when(resourceResolver.map(jakartaRequest, "/test/to/path")).thenReturn("/test/to/path");
+
+        when(jakartaRequest.getScheme()).thenReturn("https");
+        when(jakartaRequest.getServerName()).thenReturn("example.com");
+        when(jakartaRequest.getServerPort()).thenReturn(443);
+        when(jakartaRequest.getQueryString()).thenReturn("par1=val1");
+        when(requestPathInfo.getResourcePath()).thenReturn("/test/to/path");
+        when(requestPathInfo.getSelectors()).thenReturn(new String[] { "sel1", "sel2" });
+        when(requestPathInfo.getExtension()).thenReturn("html");
+        when(requestPathInfo.getSuffix()).thenReturn("/suffix/path");
+
+        SlingUri testUri = SlingUriBuilder.createFrom(jakartaRequest).build();
+
+        assertEquals("https://example.com/test/to/path.sel1.sel2.html/suffix/path?par1=val1", testUri.toString());
+    }
+
     @Test
     public void testUseSchemeAndAuthority() throws URISyntaxException {
 
diff --git a/src/test/java/org/apache/sling/api/wrappers/ResourceResolverWrapperTest.java b/src/test/java/org/apache/sling/api/wrappers/ResourceResolverWrapperTest.java
index 2bf4f87..e6aad1d 100644
--- a/src/test/java/org/apache/sling/api/wrappers/ResourceResolverWrapperTest.java
+++ b/src/test/java/org/apache/sling/api/wrappers/ResourceResolverWrapperTest.java
@@ -30,7 +30,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
 
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
@@ -59,18 +59,29 @@ public class ResourceResolverWrapperTest {
         underTest = new ResourceResolverWrapper(wrappedResolver);
     }
 
+    @SuppressWarnings("deprecation")
     @Test
     public void testResolve() throws Exception {
-        final HttpServletRequest request = mock(HttpServletRequest.class);
+        final HttpServletRequest r1 = mock(HttpServletRequest.class);
+        final javax.servlet.http.HttpServletRequest r2 = mock(javax.servlet.http.HttpServletRequest.class);
         final Resource resource = mock(Resource.class);
         when(resource.getPath()).thenReturn(PATH);
-        when(wrappedResolver.resolve(request, PATH)).thenReturn(resource);
-        final Resource result = underTest.resolve(request, PATH);
+        when(wrappedResolver.resolve(r1, PATH)).thenReturn(resource);
+        when(wrappedResolver.resolve(r2, PATH)).thenReturn(resource);
 
-        assertTrue(result instanceof ResourceWrapper);
-        assertEquals(underTest, result.getResourceResolver());
-        assertEquals(resource.getPath(), result.getPath());
-        verify(wrappedResolver).resolve(request, PATH);
+        final Resource result1 = underTest.resolve(r1, PATH);
+
+        assertTrue(result1 instanceof ResourceWrapper);
+        assertEquals(underTest, result1.getResourceResolver());
+        assertEquals(resource.getPath(), result1.getPath());
+        verify(wrappedResolver).resolve(r1, PATH);
+
+        final Resource result2 = underTest.resolve(r2, PATH);
+
+        assertTrue(result2 instanceof ResourceWrapper);
+        assertEquals(underTest, result2.getResourceResolver());
+        assertEquals(resource.getPath(), result2.getPath());
+        verify(wrappedResolver).resolve(r2, PATH);
     }
 
     @Test
@@ -86,19 +97,19 @@ public class ResourceResolverWrapperTest {
         verify(wrappedResolver).resolve(PATH);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
+    @SuppressWarnings("deprecation")
     public void testResolve2() throws Exception {
-        final HttpServletRequest request = mock(HttpServletRequest.class);
+        final javax.servlet.http.HttpServletRequest r1 = mock(javax.servlet.http.HttpServletRequest.class);
         final Resource resource = mock(Resource.class);
         when(resource.getPath()).thenReturn(PATH);
-        when(wrappedResolver.resolve(request)).thenReturn(resource);
-        final Resource result = underTest.resolve(request);
+        when(wrappedResolver.resolve(r1)).thenReturn(resource);
+        final Resource result = underTest.resolve(r1);
 
         assertTrue(result instanceof ResourceWrapper);
         assertEquals(underTest, result.getResourceResolver());
         assertEquals(resource.getPath(), result.getPath());
-        verify(wrappedResolver).resolve(request);
+        verify(wrappedResolver).resolve(r1);
     }
 
     @Test
@@ -110,12 +121,17 @@ public class ResourceResolverWrapperTest {
     }
 
     @Test
+    @SuppressWarnings("deprecation")
     public void testMap1() throws Exception {
-        final HttpServletRequest request = mock(HttpServletRequest.class);
-        when(wrappedResolver.map(request, PATH)).thenReturn(MAPPED_PATH);
-
-        assertEquals(MAPPED_PATH, underTest.map(request, PATH));
-        verify(wrappedResolver).map(request, PATH);
+        final HttpServletRequest r1 = mock(HttpServletRequest.class);
+        final javax.servlet.http.HttpServletRequest r2 = mock(javax.servlet.http.HttpServletRequest.class);
+        when(wrappedResolver.map(r1, PATH)).thenReturn(MAPPED_PATH);
+        when(wrappedResolver.map(r2, PATH)).thenReturn(MAPPED_PATH);
+
+        assertEquals(MAPPED_PATH, underTest.map(r1, PATH));
+        verify(wrappedResolver).map(r1, PATH);
+        assertEquals(MAPPED_PATH, underTest.map(r2, PATH));
+        verify(wrappedResolver).map(r2, PATH);
     }
 
     @Test