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/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new 22fbd621f1 FELIX-6762 : Support Jakarta Servlet 6.1
22fbd621f1 is described below
commit 22fbd621f113058b43d38c49765126f05b5ae4af
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Thu Apr 3 07:37:40 2025 +0200
FELIX-6762 : Support Jakarta Servlet 6.1
---
http/base/pom.xml | 8 ++++----
.../felix/http/base/internal/dispatch/ServletResponseWrapper.java | 6 ++++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/http/base/pom.xml b/http/base/pom.xml
index 24629e8637..fca00caf1b 100644
--- a/http/base/pom.xml
+++ b/http/base/pom.xml
@@ -6,9 +6,9 @@
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
@@ -68,7 +68,7 @@
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
- </instructions>
+ </instructions>
</configuration>
</plugin>
<plugin>
@@ -99,7 +99,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
- <version>6.0.0</version>
+ <version>6.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git
a/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/ServletResponseWrapper.java
b/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/ServletResponseWrapper.java
index 2f1748697b..8309d845ac 100644
---
a/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/ServletResponseWrapper.java
+++
b/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/ServletResponseWrapper.java
@@ -96,6 +96,10 @@ final class ServletResponseWrapper extends
HttpServletResponseWrapper
{
request.setAttribute(RequestDispatcher.ERROR_SERVLET_NAME, this.servletName);
}
+ request.setAttribute(RequestDispatcher.ERROR_METHOD,
this.request.getMethod());
+ if (this.request.getQueryString() != null) {
+
request.setAttribute(RequestDispatcher.ERROR_QUERY_STRING,
this.request.getQueryString());
+ }
final String servletPath = null;
final String pathInfo = request.getRequestURI();
@@ -132,6 +136,8 @@ final class ServletResponseWrapper extends
HttpServletResponseWrapper
request.removeAttribute(RequestDispatcher.ERROR_SERVLET_NAME);
request.removeAttribute(RequestDispatcher.ERROR_EXCEPTION);
request.removeAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE);
+
request.removeAttribute(RequestDispatcher.ERROR_METHOD);
+
request.removeAttribute(RequestDispatcher.ERROR_QUERY_STRING);
}
}
}