From 0acf95f38665fbadb8481b7efe328e0860a7cafd Mon Sep 17 00:00:00 2001
From: Grzegorz Grzybek
Date: Mon, 12 Jun 2023 16:35:45 +0200
Subject: [PATCH] [#1802] Switch pax-web-jsp from javax to jakarta
---
pax-web-api/pom.xml | 9 +-
.../pax/web/service/PaxWebConstants.java | 8 +-
.../ops4j/pax/web/service/WebContainer.java | 4 +-
.../pax/web/service/http/package-info.java | 3 +-
.../service/whiteboard/WebSocketMapping.java | 8 +-
pax-web-jsp/pom.xml | 147 ++++-----
pax-web-jsp/readme.adoc | 284 +++++++++---------
.../ops4j/pax/web/jsp/InstanceManager.java | 33 +-
.../ops4j/pax/web/jsp/JasperInitializer.java | 30 +-
.../org/ops4j/pax/web/jsp/JspServlet.java | 10 +-
.../ops4j/pax/web/jsp/PaxWebTldScanner.java | 6 +-
.../org/ops4j/pax/web/jsp/package-info.java | 2 +-
.../services/javax.el.ExpressionFactory | 2 +-
.../java/org/ops4j/pax/web/jsp/ElTest.java | 37 ++-
.../pax/web/jsp/JasperJspNoScriptingTest.java | 32 +-
.../org/ops4j/pax/web/jsp/JasperJspTest.java | 37 ++-
.../pax/web/jsp/PaxWebJspNoScriptingTest.java | 32 +-
.../org/ops4j/pax/web/jsp/PaxWebJspTest.java | 37 ++-
pax-web-spi/pom.xml | 5 +
pom.xml | 77 +++--
20 files changed, 397 insertions(+), 406 deletions(-)
diff --git a/pax-web-api/pom.xml b/pax-web-api/pom.xml
index 5e906e35b1..eec6aab636 100644
--- a/pax-web-api/pom.xml
+++ b/pax-web-api/pom.xml
@@ -136,7 +136,7 @@
org.osgi.framework;version="[1.10,2)",
org.osgi.framework.wiring;version="[1.2,2)",
-
+
org.osgi.service.servlet.context;version="2.0.0",
org.osgi.service.servlet.runtime;version="2.0.0",
org.osgi.service.servlet.runtime.dto;version="2.0.0",
@@ -218,11 +218,6 @@
org.osgi.namespace.extender
provided
-
- org.osgi
- org.osgi.service.http
- provided
-
org.osgi
org.osgi.service.servlet
@@ -287,7 +282,7 @@
org.assertj
assertj-core
- ${dependency.org.assertj}
+ test
org.springframework
diff --git a/pax-web-api/src/main/java/org/ops4j/pax/web/service/PaxWebConstants.java b/pax-web-api/src/main/java/org/ops4j/pax/web/service/PaxWebConstants.java
index 75a6296828..0c677dd79b 100644
--- a/pax-web-api/src/main/java/org/ops4j/pax/web/service/PaxWebConstants.java
+++ b/pax-web-api/src/main/java/org/ops4j/pax/web/service/PaxWebConstants.java
@@ -71,7 +71,7 @@ public interface PaxWebConstants {
* The only supported {@link jakarta.servlet.ServletContainerInitializer} class that configures WebSocket
* container for Jetty
*/
- String DEFAULT_WEBSOCKET_JETTY_SCI_CLASS = "org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer";
+ String DEFAULT_WEBSOCKET_JETTY_SCI_CLASS = "org.eclipse.jetty.ee10.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer";
/**
* The only supported {@link jakarta.servlet.ServletContainerInitializer} class that configures WebSocket
* container for Tomcat
@@ -280,6 +280,7 @@ public interface PaxWebConstants {
* help us provide nice OSGi-aware discovery mechanism. That's why this context parameter will provide special
* {@link java.util.Map} that can be used when searching for FACELET resources.
*/
+ // TODO: JakartaEE 10
String CONTEXT_PARAM_PAX_WEB_FACELETS_LIBRARIES = "org.ops4j.pax.web.javax.faces.FACELETS_LIBRARIES";
// --- 3 properties defined in 128.3.4 "Publishing the Servlet Context" (and one Pax Web specific)
@@ -296,4 +297,9 @@ public interface PaxWebConstants {
/** Context name of the WAB bundle or bundle registering OSGi servlet context (Pax Web addition) */
String SERVICE_PROPERTY_WEB_SERVLETCONTEXT_NAME = "osgi.web.contextname";
+ /**
+ * For compatibility purpose (OSGi CMPN 8: {@code org.osgi.service.http.whiteboard.HttpWhiteboardConstants#HTTP_SERVICE_CONTEXT_PROPERTY})
+ */
+ String HTTP_SERVICE_CONTEXT_PROPERTY = "osgi.http.whiteboard.context.httpservice";
+
}
diff --git a/pax-web-api/src/main/java/org/ops4j/pax/web/service/WebContainer.java b/pax-web-api/src/main/java/org/ops4j/pax/web/service/WebContainer.java
index cdd653dc83..5c96a29294 100644
--- a/pax-web-api/src/main/java/org/ops4j/pax/web/service/WebContainer.java
+++ b/pax-web-api/src/main/java/org/ops4j/pax/web/service/WebContainer.java
@@ -880,7 +880,7 @@ void setSessionCookieConfig(String domain, String name, Boolean httpOnly, Boolea
// methods used to register annotated web socket endpoints
/**
- * Registers a WebSocket endpoint annotated with {@code @javax.websocket.server.ServerEndpoint}. The actual
+ * Registers a WebSocket endpoint annotated with {@code @jakarta.websocket.server.ServerEndpoint}. The actual
* object passed may be both an actual instance or a {@link Class} object which will be instantiated when needed.
* @param webSocket
* @param httpContext
@@ -891,7 +891,7 @@ void setSessionCookieConfig(String domain, String name, Boolean httpOnly, Boolea
/**
* Unregisters a previously registered WebSocket endpoint annotated with
- * {@code @javax.websocket.server.ServerEndpoint}
+ * {@code @jakarta.websocket.server.ServerEndpoint}
* @param webSocket
* @param httpContext
*/
diff --git a/pax-web-api/src/main/java/org/ops4j/pax/web/service/http/package-info.java b/pax-web-api/src/main/java/org/ops4j/pax/web/service/http/package-info.java
index a7b671b456..ec343d28ca 100644
--- a/pax-web-api/src/main/java/org/ops4j/pax/web/service/http/package-info.java
+++ b/pax-web-api/src/main/java/org/ops4j/pax/web/service/http/package-info.java
@@ -21,7 +21,6 @@
* namespace.
*
* Original package is {@code org.osgi.service.http}. There's no new equivalen of this package and users
- * are encouraged to move to Jakarta Servlet Specificaiton (formerly known as
- * Whiteboard specification).
+ * are encouraged to move to Whiteboard Specification for Jakarta™ Servlet.
*/
package org.ops4j.pax.web.service.http;
diff --git a/pax-web-api/src/main/java/org/ops4j/pax/web/service/whiteboard/WebSocketMapping.java b/pax-web-api/src/main/java/org/ops4j/pax/web/service/whiteboard/WebSocketMapping.java
index d890819bb5..edf40a1255 100644
--- a/pax-web-api/src/main/java/org/ops4j/pax/web/service/whiteboard/WebSocketMapping.java
+++ b/pax-web-api/src/main/java/org/ops4j/pax/web/service/whiteboard/WebSocketMapping.java
@@ -23,22 +23,22 @@
* On purpose, we don't allow registration of other objects that usually can be passed (by means of
* {@link jakarta.servlet.annotation.HandlesTypes} annotation on a {@link jakarta.servlet.ServletContainerInitializer}
* related to WebSockets) by users. Only annontated classes or actual instances are handled and we don't support:
- * - {@code javax.websocket.server.ServerApplicationConfig}
- * - {@code javax.websocket.Endpoint}
+ * - {@code jakarta.websocket.server.ServerApplicationConfig}
+ * - {@code jakarta.websocket.Endpoint}
*
*/
public interface WebSocketMapping extends ContextRelated {
/**
* Returns a {@link Class} of the WebSocket endpoint that should be annotated with
- * {@code @javax.websocket.server.ServerEndpoint} annotation. If both the
+ * {@code @jakarta.websocket.server.ServerEndpoint} annotation. If both the
* object ({@link #getWebSocketAnnotatedEndpoint()}) and the class is specified, the class takes precedence.
* @return
*/
Class> getWebSocketClass();
/**
- * Returns an instance of a class annotated with {@code @javax.websocket.server.ServerEndpoint}. If both the
+ * Returns an instance of a class annotated with {@code @jakarta.websocket.server.ServerEndpoint}. If both the
* object and the class ({@link #getWebSocketClass()}) is specified, the class takes precedence.
* @return
*/
diff --git a/pax-web-jsp/pom.xml b/pax-web-jsp/pom.xml
index aa093efa27..74ba11b1cc 100644
--- a/pax-web-jsp/pom.xml
+++ b/pax-web-jsp/pom.xml
@@ -44,42 +44,41 @@
-
- javax.servlet;version="[3.1,5)",
- javax.servlet.annotation;version="[3.1,5)",
- javax.servlet.descriptor;version="[3.1,5)",
- javax.servlet.http;version="[3.1,5)",
+
+ jakarta.servlet;version="[6,7)",
+ jakarta.servlet.annotation;version="[6,7)",
+ jakarta.servlet.descriptor;version="[6,7)",
+ jakarta.servlet.http;version="[6,7)",
- javax.servlet.jsp;version="2.3",
- javax.servlet.jsp.el;version="2.3",
- javax.servlet.jsp.tagext;version="2.3",
+ jakarta.servlet.jsp;version="${dependency.jakarta.servlet.jsp-api}",
+ jakarta.servlet.jsp.el;version="${dependency.jakarta.servlet.jsp-api}",
+ jakarta.servlet.jsp.tagext;version="${dependency.jakarta.servlet.jsp-api}",
- javax.servlet.jsp.jstl.core;version="${dependency.jakarta.servlet.jsp.jstl-api}",
- javax.servlet.jsp.jstl.fmt;version="${dependency.jakarta.servlet.jsp.jstl-api}",
- javax.servlet.jsp.jstl.sql;version="${dependency.jakarta.servlet.jsp.jstl-api}",
- javax.servlet.jsp.jstl.tlv;version="${dependency.jakarta.servlet.jsp.jstl-api}",
+ jakarta.servlet.jsp.jstl.core;version="${dependency.jakarta.servlet.jsp.jstl-api}",
+ jakarta.servlet.jsp.jstl.fmt;version="${dependency.jakarta.servlet.jsp.jstl-api}",
+ jakarta.servlet.jsp.jstl.sql;version="${dependency.jakarta.servlet.jsp.jstl-api}",
+ jakarta.servlet.jsp.jstl.tlv;version="${dependency.jakarta.servlet.jsp.jstl-api}",
- javax.el;version="[3.0,4)",
+ jakarta.el;version="[5.0,6)",
-
- org.osgi.framework;version="[1.8,2)",
+
+ org.osgi.dto;version="[1.1,2)",
+ org.osgi.framework;version="[1.10,2)",
org.osgi.framework.wiring;version="[1.2,2)",
org.osgi.util.tracker;version="[1.5,2)",
-
- org.osgi.service.http;version="[1.2,2)",
-
org.ops4j.pax.web.utils;version="${pax-web.osgi.version}",
+ org.ops4j.pax.web.service.http;version="${pax-web.osgi.version}",
org.ops4j.pax.web.service.spi.model;version="${pax-web.osgi.version}",
org.ops4j.pax.web.service.spi.servlet;version="${pax-web.osgi.version}",
org.ops4j.pax.web.service.spi.util;version="${pax-web.osgi.version}",
- org.slf4j;version="[1.7,2)",
+ org.slf4j;version="[2,3)",
org.apache.juli.logging,
@@ -104,7 +103,7 @@
org.eclipse.jdt.internal.compiler.problem,
- javax.annotation,
+ jakarta.annotation,
javax.naming,
javax.sql;resolution:=optional,
javax.xml.parsers,
@@ -135,31 +134,17 @@
re-export JSP API - from mvn:org.apache.tomcat/tomcat-jsp-api
(instead of from mvn:jakarta.servlet.jsp/jakarta.servlet.jsp-api)
-->
- javax.servlet.jsp;version="2.3",
- javax.servlet.jsp.el;version="2.3",
- javax.servlet.jsp.tagext;version="2.3",
+ jakarta.servlet.jsp;version="${dependency.jakarta.servlet.jsp-api}",
+ jakarta.servlet.jsp.el;version="${dependency.jakarta.servlet.jsp-api}",
+ jakarta.servlet.jsp.tagext;version="${dependency.jakarta.servlet.jsp-api}",
- javax.servlet.jsp.jstl.core;version="${dependency.jakarta.servlet.jsp.jstl-api}",
- javax.servlet.jsp.jstl.fmt;version="${dependency.jakarta.servlet.jsp.jstl-api}",
- javax.servlet.jsp.jstl.sql;version="${dependency.jakarta.servlet.jsp.jstl-api}",
- javax.servlet.jsp.jstl.tlv;version="${dependency.jakarta.servlet.jsp.jstl-api}",
+ jakarta.servlet.jsp.jstl.core;version="${dependency.jakarta.servlet.jsp.jstl-api}",
+ jakarta.servlet.jsp.jstl.fmt;version="${dependency.jakarta.servlet.jsp.jstl-api}",
+ jakarta.servlet.jsp.jstl.sql;version="${dependency.jakarta.servlet.jsp.jstl-api}",
+ jakarta.servlet.jsp.jstl.tlv;version="${dependency.jakarta.servlet.jsp.jstl-api}",
-
+
org.apache.el;version="${dependency.org.apache.tomcat}",
org.apache.el.lang;version="${dependency.org.apache.tomcat}",
org.apache.el.parser;version="${dependency.org.apache.tomcat}",
@@ -185,6 +170,7 @@
impl in 2010 (http://svn.apache.org/viewvc?view=revision&revision=1026635),
so we hopefuly clear the confusion in pax-web-jsp
-->
+
org.apache.taglibs.standard;version="1.2",
org.apache.taglibs.standard.functions;version="1.2",
org.apache.taglibs.standard.tag.common.core;version="1.2",
@@ -197,14 +183,11 @@
org.apache.taglibs.standard.tag.rt.xml;version="1.2",
org.apache.taglibs.standard.tei;version="1.2",
org.apache.taglibs.standard.tlv;version="1.2",
- org.apache.taglibs.standard.util;version="1.2",
-
- !org.apache.taglibs.standard.tag.compat.*,
!org.apache.taglibs.standard.lang.*,
!org.apache.taglibs.standard.tag.el.*,
- !org.apache.taglibs.standard.tlv.el
+ !org.apache.taglibs.standard.tlv
@@ -221,8 +204,9 @@
<_nouses>true
<_contract>!*
+
="2.3,2.2,2.1,2"
]]>
@@ -271,16 +255,21 @@
provided
-
+
jakarta.el
jakarta.el-api
provided
+
+ jakarta.annotation
+ jakarta.annotation-api
+ provided
+
org.apache.tomcat
@@ -289,11 +278,11 @@
org.apache.tomcat
tomcat-jsp-api
@@ -304,10 +293,10 @@
This dependency provides packages to re-export from pax-web-jsp. While jakarta.servlet-api and
jakarta.servlet.jsp-api can't be used (because they contain no resources), with JSTL we can use
jakarta.servlet.jsp.jstl-api - also because there's no analogous org.apache.tomcat JAR.
- - javax.servlet.jsp.jstl.core
- - javax.servlet.jsp.jstl.fmt
- - javax.servlet.jsp.jstl.sql
- - javax.servlet.jsp.jstl.tlv
+ - jakarta.servlet.jsp.jstl.core
+ - jakarta.servlet.jsp.jstl.fmt
+ - jakarta.servlet.jsp.jstl.sql
+ - jakarta.servlet.jsp.jstl.tlv
-->
jakarta.servlet.jsp.jstl
jakarta.servlet.jsp.jstl-api
@@ -360,7 +349,9 @@
- org.apache.taglibs
- taglibs-standard-impl
+ org.glassfish.web
+ jakarta.servlet.jsp.jstl
provided
@@ -436,7 +426,7 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
test
@@ -449,10 +439,20 @@
- junit
- junit
+ org.junit.jupiter
+ junit-jupiter-api
test
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ test
+
+
+ org.assertj
+ assertj-core
+ ${dependency.org.assertj}
+
org.mockito
mockito-core
@@ -461,23 +461,4 @@
-
-
- jdk11
-
- [9,)
-
-
-
-
-
-
- jakarta.annotation
- jakarta.annotation-api
-
-
-
-
-
-
diff --git a/pax-web-jsp/readme.adoc b/pax-web-jsp/readme.adoc
index d190a12340..f93d6830fb 100644
--- a/pax-web-jsp/readme.adoc
+++ b/pax-web-jsp/readme.adoc
@@ -1,3 +1,4 @@
+// TODO: JakartaEE 10
= pax-web-jsp
== Motivation
@@ -13,8 +14,8 @@ I won't mention JSF (2.3 - JSR 372) and WebSockets (1.1 - JSR 356) here.
While Pax-Web JSP (and Pax-Web in general) assumes Servlets API and EL API to be exported by separate bundles:
-* usually official `mvn:javax.servlet/javax.servlet-api/*`
-* usually official `mvn:javax.el/javax.el-api/3.0.0`
+* usually official `mvn:jakarta.servlet/jakarta.servlet-api/*`
+* usually official `mvn:jakarta.el/jakarta.el-api/*`
These will be embedded (and in case of API also exported) within pax-web-jsp itself:
@@ -30,155 +31,155 @@ Servlet API implementation is provided by pax-web-tomcat, pax-web-jetty and pax-
`pax-web-jsp` doesn't provide any OSGi _entry points_ like bundle activators, SCR components or blueprint descriptors. This bundle's classes have to be used explicitly.
-`pax-web-jsp` however provides several JavaEE/JavaSE _entry points_:
+`pax-web-jsp` however provides several JakartaEE/JavaSE _entry points_:
-* `/META-INF/services/javax.el.ExpressionFactory` with `org.apache.el.ExpressionFactoryImpl` service
-* `/META-INF/services/javax.servlet.ServletContainerInitializer` with `org.apache.jasper.servlet.JasperInitializer` service (to check)
+* `/META-INF/services/jakarta.el.ExpressionFactory` with `org.apache.el.ExpressionFactoryImpl` service
+* `/META-INF/services/jakarta.servlet.ServletContainerInitializer` with `org.apache.jasper.servlet.JasperInitializer` service (to check)
* `org.ops4j.pax.web.jsp.JasperInitializer` used directly by pax-web-runtime
(I'll try to make it less confusing and more clear.)
== Information about JSP / JSTL implementations
-Taking into account JavaEE 5 - 8 specifications, we have:
+Taking into account JakartaEE 5 - 8 specifications, we have:
-* JavaEE 5: JSP 2.1, JSTL 1.2
-* JavaEE 6: JSP 2.2, JSTL 1.2
-* JavaEE 7: JSP 2.3, JSTL 1.2
-* JavaEE 8 (and JakartaEE 8): JSP 2.3, JSTL 1.2
+* JakartaEE 5: JSP 2.1, JSTL 1.2
+* JakartaEE 6: JSP 2.2, JSTL 1.2
+* JakartaEE 7: JSP 2.3, JSTL 1.2
+* JakartaEE 8 (and JakartaEE 8): JSP 2.3, JSTL 1.2
List of Maven artifacts providing APIs and implementations related to Servlets/JSP/EL/JSTL specifications.
-* Official JavaEE (recently repackaged under `jakarta` groupId) bundles for APIs (not for implementations!):
-** mvn:javax.servlet/javax.servlet-api/3.1.0
+* Official JakartaEE (recently repackaged under `jakarta` groupId) bundles for APIs (not for implementations!):
+** mvn:jakarta.servlet/jakarta.servlet-api/3.1.0
+
[options=nowrap]
----
Contains:
- javax.servlet
- javax.servlet.annotation
- javax.servlet.descriptor
- javax.servlet.http
+ jakarta.servlet
+ jakarta.servlet.annotation
+ jakarta.servlet.descriptor
+ jakarta.servlet.http
Export-Package:
- javax.servlet; version="3.1.0"; uses:="javax.servlet.annotation,javax.servlet.descriptor",
- javax.servlet.annotation; version="3.1.0"; uses:="javax.servlet",
- javax.servlet.descriptor; version="3.1.0",
- javax.servlet.http; version="3.1.0"; uses:="javax.servlet"
+ jakarta.servlet; version="3.1.0"; uses:="jakarta.servlet.annotation,jakarta.servlet.descriptor",
+ jakarta.servlet.annotation; version="3.1.0"; uses:="jakarta.servlet",
+ jakarta.servlet.descriptor; version="3.1.0",
+ jakarta.servlet.http; version="3.1.0"; uses:="jakarta.servlet"
Import-Package:
- javax.servlet; version="3.1.0",
- javax.servlet.annotation; version="3.1.0",
- javax.servlet.descriptor; version="3.1.0",
- javax.servlet.http; version="3.1.0"
+ jakarta.servlet; version="3.1.0",
+ jakarta.servlet.annotation; version="3.1.0",
+ jakarta.servlet.descriptor; version="3.1.0",
+ jakarta.servlet.http; version="3.1.0"
----
-** mvn:javax.servlet/javax.servlet-api/4.0.1
+** mvn:jakarta.servlet/jakarta.servlet-api/4.0.1
+
[options=nowrap]
----
Contains:
- javax.servlet
- javax.servlet.annotation
- javax.servlet.descriptor
- javax.servlet.http
+ jakarta.servlet
+ jakarta.servlet.annotation
+ jakarta.servlet.descriptor
+ jakarta.servlet.http
Export-Package:
- javax.servlet; version="4.0.0"; uses:="javax.servlet.annotation,javax.servlet.descriptor",
- javax.servlet.annotation; version="4.0.0"; uses:="javax.servlet",
- javax.servlet.descriptor; version="4.0.0",
- javax.servlet.http; version="4.0.0"; uses:="javax.servlet"
+ jakarta.servlet; version="4.0.0"; uses:="jakarta.servlet.annotation,jakarta.servlet.descriptor",
+ jakarta.servlet.annotation; version="4.0.0"; uses:="jakarta.servlet",
+ jakarta.servlet.descriptor; version="4.0.0",
+ jakarta.servlet.http; version="4.0.0"; uses:="jakarta.servlet"
Import-Package:
- javax.servlet; version="4.0.0",
- javax.servlet.annotation; version="4.0.0",
- javax.servlet.descriptor; version="4.0.0",
- javax.servlet.http; version="4.0.0"
+ jakarta.servlet; version="4.0.0",
+ jakarta.servlet.annotation; version="4.0.0",
+ jakarta.servlet.descriptor; version="4.0.0",
+ jakarta.servlet.http; version="4.0.0"
----
** mvn:jakarta.servlet/jakarta.servlet-api/4.0.3
+
[options=nowrap]
----
Contains:
- javax.servlet
- javax.servlet.annotation
- javax.servlet.descriptor
- javax.servlet.http
+ jakarta.servlet
+ jakarta.servlet.annotation
+ jakarta.servlet.descriptor
+ jakarta.servlet.http
Export-Package:
- javax.servlet; version="4.0.0"; uses:="javax.servlet.annotation,javax.servlet.descriptor",
- javax.servlet.annotation; version="4.0.0"; uses:="javax.servlet",
- javax.servlet.descriptor; version="4.0.0",
- javax.servlet.http; version="4.0.0"; uses:="javax.servlet"
+ jakarta.servlet; version="4.0.0"; uses:="jakarta.servlet.annotation,jakarta.servlet.descriptor",
+ jakarta.servlet.annotation; version="4.0.0"; uses:="jakarta.servlet",
+ jakarta.servlet.descriptor; version="4.0.0",
+ jakarta.servlet.http; version="4.0.0"; uses:="jakarta.servlet"
Import-Package:
- javax.servlet,
- javax.servlet.annotation,
- javax.servlet.descriptor
+ jakarta.servlet,
+ jakarta.servlet.annotation,
+ jakarta.servlet.descriptor
----
-** mvn:javax.servlet.jsp/javax.servlet.jsp-api/2.3.3
+** mvn:jakarta.servlet.jsp/jakarta.servlet.jsp-api/2.3.3
+
[options=nowrap]
----
Contains:
- javax.servlet.jsp
- javax.servlet.jsp.el
- javax.servlet.jsp.tagext
+ jakarta.servlet.jsp
+ jakarta.servlet.jsp.el
+ jakarta.servlet.jsp.tagext
Export-Package:
- javax.servlet.jsp; version="2.3.3"; uses:="javax.servlet,javax.el,javax.servlet.jsp.el,javax.servlet.jsp.tagext,javax.servlet.http"
- javax.servlet.jsp.el; version="2.3.3"; uses:="javax.servlet,javax.el,javax.servlet.jsp,javax.servlet.http",
- javax.servlet.jsp.tagext; version="2.3.3"; uses:="javax.servlet.jsp",
+ jakarta.servlet.jsp; version="2.3.3"; uses:="jakarta.servlet,javax.el,jakarta.servlet.jsp.el,jakarta.servlet.jsp.tagext,jakarta.servlet.http"
+ jakarta.servlet.jsp.el; version="2.3.3"; uses:="jakarta.servlet,javax.el,jakarta.servlet.jsp,jakarta.servlet.http",
+ jakarta.servlet.jsp.tagext; version="2.3.3"; uses:="jakarta.servlet.jsp",
Import-Package:
javax.el,
- javax.servlet,
- javax.servlet.http,
- javax.servlet.jsp; version="2.3.3",
- javax.servlet.jsp.el; version="2.3.3",
- javax.servlet.jsp.tagext; version="2.3.3"
+ jakarta.servlet,
+ jakarta.servlet.http,
+ jakarta.servlet.jsp; version="2.3.3",
+ jakarta.servlet.jsp.el; version="2.3.3",
+ jakarta.servlet.jsp.tagext; version="2.3.3"
----
** mvn:jakarta.servlet.jsp/jakarta.servlet.jsp-api/2.3.6
+
[options=nowrap]
----
Contains:
- javax.servlet.jsp
- javax.servlet.jsp.el
- javax.servlet.jsp.tagext
+ jakarta.servlet.jsp
+ jakarta.servlet.jsp.el
+ jakarta.servlet.jsp.tagext
Export-Package:
- javax.servlet.jsp; version="2.3.6"; uses:="javax.servlet,javax.el,javax.servlet.jsp.el,javax.servlet.jsp.tagext,javax.servlet.http",
- javax.servlet.jsp.el; version="2.3.6"; uses:="javax.servlet,javax.el,javax.servlet.jsp,javax.servlet.http",
- javax.servlet.jsp.tagext; version="2.3.6"; uses:="javax.servlet.jsp"
+ jakarta.servlet.jsp; version="2.3.6"; uses:="jakarta.servlet,javax.el,jakarta.servlet.jsp.el,jakarta.servlet.jsp.tagext,jakarta.servlet.http",
+ jakarta.servlet.jsp.el; version="2.3.6"; uses:="jakarta.servlet,javax.el,jakarta.servlet.jsp,jakarta.servlet.http",
+ jakarta.servlet.jsp.tagext; version="2.3.6"; uses:="jakarta.servlet.jsp"
Import-Package:
javax.el,
- javax.servlet,
- javax.servlet.http,
- javax.servlet.jsp; version="2.3.6",
- javax.servlet.jsp.el; version="2.3.6",
- javax.servlet.jsp.tagext; version="2.3.6"
+ jakarta.servlet,
+ jakarta.servlet.http,
+ jakarta.servlet.jsp; version="2.3.6",
+ jakarta.servlet.jsp.el; version="2.3.6",
+ jakarta.servlet.jsp.tagext; version="2.3.6"
----
-** mvn:javax.servlet.jsp.jstl/javax.servlet.jsp.jstl-api/1.2.2
+** mvn:jakarta.servlet.jsp.jstl/jakarta.servlet.jsp.jstl-api/1.2.2
+
[options=nowrap]
----
Contains:
- javax.servlet.jsp.jstl.core
- javax.servlet.jsp.jstl.fmt
- javax.servlet.jsp.jstl.sql
- javax.servlet.jsp.jstl.tlv
+ jakarta.servlet.jsp.jstl.core
+ jakarta.servlet.jsp.jstl.fmt
+ jakarta.servlet.jsp.jstl.sql
+ jakarta.servlet.jsp.jstl.tlv
Export-Package:
- javax.servlet.jsp.jstl.core; version="1.2.2"; uses:="javax.servlet,javax.el,javax.servlet.jsp.tagext,javax.servlet.jsp,javax.servlet.http",
- javax.servlet.jsp.jstl.fmt; version="1.2.2"; uses:="javax.servlet,javax.servlet.jsp.jstl.core,javax.servlet.jsp,javax.servlet.http",
- javax.servlet.jsp.jstl.sql; version="1.2.2",
- javax.servlet.jsp.jstl.tlv; version="1.2.2"; uses:="javax.xml.parsers,javax.servlet.jsp.tagext,org.xml.sax.helpers,org.xml.sax"
+ jakarta.servlet.jsp.jstl.core; version="1.2.2"; uses:="jakarta.servlet,javax.el,jakarta.servlet.jsp.tagext,jakarta.servlet.jsp,jakarta.servlet.http",
+ jakarta.servlet.jsp.jstl.fmt; version="1.2.2"; uses:="jakarta.servlet,jakarta.servlet.jsp.jstl.core,jakarta.servlet.jsp,jakarta.servlet.http",
+ jakarta.servlet.jsp.jstl.sql; version="1.2.2",
+ jakarta.servlet.jsp.jstl.tlv; version="1.2.2"; uses:="javax.xml.parsers,jakarta.servlet.jsp.tagext,org.xml.sax.helpers,org.xml.sax"
Import-Package:
javax.el,
- javax.servlet,
- javax.servlet.http,
- javax.servlet.jsp,
- javax.servlet.jsp.jstl.core; version="1.2.2",
- javax.servlet.jsp.jstl.fmt; version="1.2.2",
- javax.servlet.jsp.jstl.sql; version="1.2.2",
- javax.servlet.jsp.jstl.tlv; version="1.2.2",
- javax.servlet.jsp.tagext,
+ jakarta.servlet,
+ jakarta.servlet.http,
+ jakarta.servlet.jsp,
+ jakarta.servlet.jsp.jstl.core; version="1.2.2",
+ jakarta.servlet.jsp.jstl.fmt; version="1.2.2",
+ jakarta.servlet.jsp.jstl.sql; version="1.2.2",
+ jakarta.servlet.jsp.jstl.tlv; version="1.2.2",
+ jakarta.servlet.jsp.tagext,
javax.xml.parsers,
org.xml.sax,
org.xml.sax.helpers
@@ -188,26 +189,26 @@ Import-Package:
[options=nowrap]
----
Contains:
- javax.servlet.jsp.jstl.core
- javax.servlet.jsp.jstl.fmt
- javax.servlet.jsp.jstl.sql
- javax.servlet.jsp.jstl.tlv
+ jakarta.servlet.jsp.jstl.core
+ jakarta.servlet.jsp.jstl.fmt
+ jakarta.servlet.jsp.jstl.sql
+ jakarta.servlet.jsp.jstl.tlv
Export-Package:
- javax.servlet.jsp.jstl.core; version="1.2.7";uses:="javax.servlet,javax.servlet.http,javax.servlet.jsp.tagext,javax.el,javax.servlet.jsp",
- javax.servlet.jsp.jstl.fmt; version="1.2.7";uses:="javax.servlet,javax.servlet.jsp.jstl.core,javax.servlet.http,javax.servlet.jsp",
- javax.servlet.jsp.jstl.sql; version="1.2.7",
- javax.servlet.jsp.jstl.tlv; version="1.2.7";uses:="org.xml.sax.helpers,org.xml.sax,javax.servlet.jsp.tagext,javax.xml.parsers"
+ jakarta.servlet.jsp.jstl.core; version="1.2.7";uses:="jakarta.servlet,jakarta.servlet.http,jakarta.servlet.jsp.tagext,javax.el,jakarta.servlet.jsp",
+ jakarta.servlet.jsp.jstl.fmt; version="1.2.7";uses:="jakarta.servlet,jakarta.servlet.jsp.jstl.core,jakarta.servlet.http,jakarta.servlet.jsp",
+ jakarta.servlet.jsp.jstl.sql; version="1.2.7",
+ jakarta.servlet.jsp.jstl.tlv; version="1.2.7";uses:="org.xml.sax.helpers,org.xml.sax,jakarta.servlet.jsp.tagext,javax.xml.parsers"
Import-Package:
javax.el; version="3.0",
- javax.servlet; version="4.0",
- javax.servlet.http; version="4.0",
- javax.servlet.jsp,
- javax.servlet.jsp.jstl.core; version="1.2.7",
- javax.servlet.jsp.jstl.fmt; version="1.2.7",
- javax.servlet.jsp.jstl.sql; version="1.2.7",
- javax.servlet.jsp.jstl.tlv; version="1.2.7",
- javax.servlet.jsp.tagext,
+ jakarta.servlet; version="4.0",
+ jakarta.servlet.http; version="4.0",
+ jakarta.servlet.jsp,
+ jakarta.servlet.jsp.jstl.core; version="1.2.7",
+ jakarta.servlet.jsp.jstl.fmt; version="1.2.7",
+ jakarta.servlet.jsp.jstl.sql; version="1.2.7",
+ jakarta.servlet.jsp.jstl.tlv; version="1.2.7",
+ jakarta.servlet.jsp.tagext,
javax.xml.parsers,
org.xml.sax,
org.xml.sax.helpers
@@ -237,19 +238,19 @@ Export-Package:
** mvn:org.apache.tomcat/tomcat-servlet-api - just Servlet API
+
----
-javax.servlet
-javax.servlet.annotation
-javax.servlet.descriptor
-javax.servlet.http
-javax.servlet.resources
+jakarta.servlet
+jakarta.servlet.annotation
+jakarta.servlet.descriptor
+jakarta.servlet.http
+jakarta.servlet.resources
----
** mvn:org.apache.tomcat/tomcat-jsp-api - just JSP API
+
----
-javax.servlet.jsp
-javax.servlet.jsp.el
-javax.servlet.jsp.resources
-javax.servlet.jsp.tagext
+jakarta.servlet.jsp
+jakarta.servlet.jsp.el
+jakarta.servlet.jsp.resources
+jakarta.servlet.jsp.tagext
----
** mvn:org.apache.tomcat/tomcat-el-api - just EL API
+
@@ -273,26 +274,26 @@ org.apache.el.*
+
----
Contains:
- javax.servlet.jsp.jstl.core
- javax.servlet.jsp.jstl.fmt
- javax.servlet.jsp.jstl.sql
- javax.servlet.jsp.jstl.tlv
+ jakarta.servlet.jsp.jstl.core
+ jakarta.servlet.jsp.jstl.fmt
+ jakarta.servlet.jsp.jstl.sql
+ jakarta.servlet.jsp.jstl.tlv
Export-Package:
- javax.servlet.jsp.jstl.core; version="1.2"; uses:="javax.servlet.jsp.tagext,javax.servlet.jsp,javax.servlet,javax.servlet.http,javax.el",
- javax.servlet.jsp.jstl.fmt; version="1.2"; uses:="javax.servlet,javax.servlet.jsp.jstl.core,javax.servlet.jsp,javax.servlet.http",
- javax.servlet.jsp.jstl.sql; version="1.2",
- javax.servlet.jsp.jstl.tlv; version="1.2"; uses:="javax.xml.parsers,javax.servlet.jsp.tagext,org.xml.sax.helpers,org.xml.sax"
+ jakarta.servlet.jsp.jstl.core; version="1.2"; uses:="jakarta.servlet.jsp.tagext,jakarta.servlet.jsp,jakarta.servlet,jakarta.servlet.http,javax.el",
+ jakarta.servlet.jsp.jstl.fmt; version="1.2"; uses:="jakarta.servlet,jakarta.servlet.jsp.jstl.core,jakarta.servlet.jsp,jakarta.servlet.http",
+ jakarta.servlet.jsp.jstl.sql; version="1.2",
+ jakarta.servlet.jsp.jstl.tlv; version="1.2"; uses:="javax.xml.parsers,jakarta.servlet.jsp.tagext,org.xml.sax.helpers,org.xml.sax"
Import-Package:
javax.el,
- javax.servlet,
- javax.servlet.http,
- javax.servlet.jsp,
- javax.servlet.jsp.jstl.core; version="1.2",
- javax.servlet.jsp.jstl.fmt; version="1.2",
- javax.servlet.jsp.jstl.sql; version="1.2",
- javax.servlet.jsp.jstl.tlv; version="1.2",
- javax.servlet.jsp.tagext,
+ jakarta.servlet,
+ jakarta.servlet.http,
+ jakarta.servlet.jsp,
+ jakarta.servlet.jsp.jstl.core; version="1.2",
+ jakarta.servlet.jsp.jstl.fmt; version="1.2",
+ jakarta.servlet.jsp.jstl.sql; version="1.2",
+ jakarta.servlet.jsp.jstl.tlv; version="1.2",
+ jakarta.servlet.jsp.tagext,
javax.xml.parsers,
org.xml.sax,
org.xml.sax.helpers
@@ -322,25 +323,25 @@ org.apache.taglibs.standard.util
----
* Jetty <9.2: Glassfish implementation
-** mvn:javax.servlet.jsp/javax.servlet.jsp-api
+** mvn:jakarta.servlet.jsp/jakarta.servlet.jsp-api
** mvn:org.glassfish/javax.el
-** mvn:org.glassfish.web/javax.servlet.jsp
-** mvn:org.glassfish.web/javax.servlet.jsp.jstl
+** mvn:org.glassfish.web/jakarta.servlet.jsp
+** mvn:org.glassfish.web/jakarta.servlet.jsp.jstl
* Jetty >=9.2: Apache (Tomcat) implementation
** mvn:org.mortbay.jasper/apache-jsp - actually shaded mvn:org.apache.tomcat/tomcat-jasper
* Undertow 1.4.x (https://github.com/undertow-io/jastow) - a fork (with Tomcat deps removed) of tomcat-jasper
-* Glassfish 5.1 (https://github.com/eclipse-ee4j/glassfish) - it uses many Jakarta-branded JavaEE APIs - mostly from
+* Glassfish 5.1 (https://github.com/eclipse-ee4j/glassfish) - it uses many Jakarta-branded JakartaEE APIs - mostly from
`org.glassfish.web` groupId
-** Servlet API: mvn:javax.servlet/javax.servlet-api/4.0.1 → mvn:jakarta.servlet/jakarta.servlet-api/4.0.2
-** JSP API: mvn:javax.servlet.jsp/javax.servlet.jsp-api/2.3.4-SNAPSHOT → mvn:jakarta.servlet.jsp/jakarta.servlet.jsp-api/2.3.4-SNAPSHOT
-** JSP Impl: mvn:org.glassfish.web/javax.servlet.jsp/2.3.4 - based on org.apache.tomcat/tomcat-jasper
-** JSTL API: mvn:javax.servlet.jsp.jstl/javax.servlet.jsp.jstl-api/1.2.2 → mvn:jakarta.servlet.jsp.jstl/jakarta.servlet.jsp.jstl-api/1.2.7
-** JSTL Impl: mvn:org.glassfish.web/javax.servlet.jsp.jstl/1.2.6-SNAPSHOT → mvn:org.glassfish.web/jakarta.servlet.jsp.jstl/1.2.6 - based on org.apache.taglibs/taglibs-standard-impl
+** Servlet API: mvn:jakarta.servlet/jakarta.servlet-api/4.0.1 → mvn:jakarta.servlet/jakarta.servlet-api/4.0.2
+** JSP API: mvn:jakarta.servlet.jsp/jakarta.servlet.jsp-api/2.3.4-SNAPSHOT → mvn:jakarta.servlet.jsp/jakarta.servlet.jsp-api/2.3.4-SNAPSHOT
+** JSP Impl: mvn:org.glassfish.web/jakarta.servlet.jsp/2.3.4 - based on org.apache.tomcat/tomcat-jasper
+** JSTL API: mvn:jakarta.servlet.jsp.jstl/jakarta.servlet.jsp.jstl-api/1.2.2 → mvn:jakarta.servlet.jsp.jstl/jakarta.servlet.jsp.jstl-api/1.2.7
+** JSTL Impl: mvn:org.glassfish.web/jakarta.servlet.jsp.jstl/1.2.6-SNAPSHOT → mvn:org.glassfish.web/jakarta.servlet.jsp.jstl/1.2.6 - based on org.apache.taglibs/taglibs-standard-impl
** EL API: mvn:javax.el/javax.el-api/3.0.0 → mvn:jakarta.el/jakarta.el-api/3.0.2
-** EL Impl: mvn:org.glassfish/javax.el.impl/3.0.1-SNAPSHOT
+** EL Impl: mvn:org.glassfish/jakarta.el.impl/3.0.1-SNAPSHOT
** EL API + Impl: mvn:org.glassfish/javax.el/3.0.1-SNAPSHOT
About JSTL (https://tomcat.apache.org/taglibs.html):
@@ -380,15 +381,14 @@ The goal of pax-web-jsp from Pax Web perspective is to add "JSP support" to all
By "JSP support" I don't mean actual Jasper Servlet (`org.apache.jasper.servlet.JspServlet`), but rather registration of `org.apache.jasper.servlet.JasperInitializer` in the context when pax-web-jsp is available.
Original `org.apache.jasper.servlet.JasperInitializer` creates and runs `org.apache.jasper.servlet.TldScanner` which detects `*.tld` files and possibly reads `//` elements which are then called. For example, one of such listeners is `org.apache.myfaces.webapp.StartupServletContextListener`.
-Some well-known `javax.servlet.ServletContainerInitializer` services from `/META-INF/services/javax.servlet.ServletContainerInitializer`:
+Some well-known `jakarta.servlet.ServletContainerInitializer` services from `/META-INF/services/jakarta.servlet.ServletContainerInitializer`:
* `org.apache.jasper.servlet.JasperInitializer`
* `org.apache.tomcat.websocket.server.WsSci`
* `org.apache.myfaces.ee6.MyFacesContainerInitializer`
* `io.undertow.servlet.sse.ServerSentEventSCI`
* `org.springframework.web.SpringServletContainerInitializer` (bridge to `org.springframework.web.WebApplicationInitializer` SPI)
-* `org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer`
-* `org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer`
+* `org.eclipse.jetty.ee10.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer`
* `com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer`
What's most important for Jasper engine is that a JSP servlet requires one context attribute named `org.apache.tomcat.InstanceManager`. This implementation is used to create (and destroy) instances of classes - possibly with support for annotations like `@PostConstruct`. Such instance manager is set by `org.apache.jasper.servlet.JasperInitializer`. This initializer also sets `org.apache.jasper.compiler.TldCache` context attribute.
diff --git a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/InstanceManager.java b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/InstanceManager.java
index 3b4315280a..ff231271b6 100644
--- a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/InstanceManager.java
+++ b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/InstanceManager.java
@@ -18,9 +18,6 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -29,11 +26,9 @@
import java.util.Map;
import java.util.Properties;
import java.util.WeakHashMap;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.servlet.Filter;
-
-import org.apache.jasper.security.SecurityUtil;
+import jakarta.annotation.PostConstruct;
+import jakarta.annotation.PreDestroy;
+import jakarta.servlet.Filter;
public class InstanceManager implements org.apache.tomcat.InstanceManager {
@@ -223,27 +218,7 @@ protected int getAnnotationCacheSize() {
protected Class> loadClassMaybePrivileged(final String className,
final ClassLoader classLoader) throws ClassNotFoundException {
- Class> clazz;
- if (SecurityUtil.isPackageProtectionEnabled()) {
- try {
- clazz = AccessController
- .doPrivileged(new PrivilegedExceptionAction>() {
-
- @Override
- public Class> run() throws Exception {
- return classLoader.loadClass(className);
- }
- });
- } catch (PrivilegedActionException e) {
- Throwable t = e.getCause();
- if (t instanceof ClassNotFoundException) {
- throw (ClassNotFoundException) t;
- }
- throw new RuntimeException(t);
- }
- } else {
- clazz = classLoader.loadClass(className);
- }
+ Class> clazz = classLoader.loadClass(className);
checkAccess(clazz);
return clazz;
}
diff --git a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/JasperInitializer.java b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/JasperInitializer.java
index 14a8f23b39..23052938ef 100644
--- a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/JasperInitializer.java
+++ b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/JasperInitializer.java
@@ -16,9 +16,9 @@
package org.ops4j.pax.web.jsp;
import java.util.Set;
-import javax.servlet.ServletContainerInitializer;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
+import jakarta.servlet.ServletContainerInitializer;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
import org.apache.jasper.servlet.TldScanner;
import org.apache.tomcat.JarScanner;
@@ -35,7 +35,7 @@
/**
* Pax Web extends original initializer, so it is possible to override the {@link TldScanner}.
*
- * This initializer is declared in {@code /META-INF/services/javax.servlet.ServletContainerInitializer}
+ *
This initializer is declared in {@code /META-INF/services/jakarta.servlet.ServletContainerInitializer}
* for pax-web-extender-war purpose. For Whiteboard and HttpService purposes, it is used directly to configure the
* context(s) when JSP support is required.
*
@@ -48,9 +48,9 @@
* there is not many details about how exactly JSPs (and TLDs) should be supported.
*
* So we start with the asumption that CMPN 128 specification is about supporting WARs in OSGi runtime in very
- * similar way to how they work in JavaEE environments. The most important common ground is how to use
+ * similar way to how they work in JakartaEE environments. The most important common ground is how to use
* classloaders to find necessary resources. Details of how TLDs should be located are described inline below. Here's
- * the outline: in JavaEE, WAR is associated with single classloader, which includes:
+ * the outline: in JakartaEE, WAR is associated with single classloader, which includes:
* - {@code /WEB-INF/classes} directory
* - each of the {@code /WEN-INF/lib/*.jar}
*
@@ -137,7 +137,7 @@ public void onStartup(Set> types, ServletContext context) throws Servle
// 1a) create org.apache.tomcat.util.descriptor.tld.TldParser
// 2) call org.apache.jasper.servlet.TldScanner.scan() to detect all *.tld files
// 3) get all the listeners declared in *.tld files and pass them (as strings) to
- // javax.servlet.ServletContext.addListener(java.lang.String)
+ // jakarta.servlet.ServletContext.addListener(java.lang.String)
super.onStartup(types, context);
}
@@ -149,14 +149,14 @@ protected TldScanner newTldScanner(ServletContext context, boolean namespaceAwar
// - org.apache.tomcat.util.descriptor.tld.TaglibXml object pushed as top level bean
// (the top-level element should be "{http://java.sun.com/xml/ns/javaee}taglib")
// - in places defined by "JSP.7.3.2 TLD resource path" of JSR 245 JSP Specification:
- // 1) JavaEE Platform entries: JSP standard tag library and JSF libraries
+ // 1) JakartaEE Platform entries: JSP standard tag library and JSF libraries
// - Tomcat does nothing here
// 2) JSP 7.3.3 /web-app/jsp-config/taglib/taglib-location elements from web.xml
- // - Tomcat calls javax.servlet.ServletContext.getJspConfigDescriptor() and then
- // javax.servlet.descriptor.JspConfigDescriptor.getTaglibs() - we have relevant methods in
+ // - Tomcat calls jakarta.servlet.ServletContext.getJspConfigDescriptor() and then
+ // jakarta.servlet.descriptor.JspConfigDescriptor.getTaglibs() - we have relevant methods in
// WebContainer interface
// - for each location (with /WEB-INF/ prepended if it's relative),
- // javax.servlet.ServletContext.getResource() is called
+ // jakarta.servlet.ServletContext.getResource() is called
// - if it's *.jar, then META-INF/taglib.tld entry is being checked
// - it can't be inside /WEB-INF/classes
// - it can't be inside /WEB-INF/lib
@@ -164,11 +164,11 @@ protected TldScanner newTldScanner(ServletContext context, boolean namespaceAwar
// 3) JSP 7.3.4 Implicit TLDs from
// - WEB-INF/lib/**/*.jar files (only META-INF/**/*.tld entries)
// - uses org.apache.tomcat.util.scan.StandardJarScanner
- // - calls javax.servlet.ServletContext.getResourcePaths("/WEB-INF/lib/")
+ // - calls jakarta.servlet.ServletContext.getResourcePaths("/WEB-INF/lib/")
// - for each JAR, tomcat.util.scan.StandardJarScanFilter.jarsToSkip and
// tomcat.util.scan.StandardJarScanFilter.jarsToScan system properties are checked, which
// are comma-separated simple names of jar files
- // - javax.servlet.ServletContext.getResource() is called for non-skipped JAR
+ // - jakarta.servlet.ServletContext.getResource() is called for non-skipped JAR
// - by default, Class-Path MANIFEST.MF entry is checked for JARs unless JARs from webapp are
// checked
// - for each JAR, only META-INF/**/*.tld entries are checked
@@ -177,7 +177,7 @@ protected TldScanner newTldScanner(ServletContext context, boolean namespaceAwar
// unpacked into WEB-INF/classes as happens with some IDEs"
// - WEB-INF/**/*.tld files (but not in WEB-INF/classes or WEB-INF/lib or WEB-INF/tags (implicit.tld
// is allowed))
- // - Tomcat calls javax.servlet.ServletContext.getResourcePaths("/WEB-INF/") and does a DFS for
+ // - Tomcat calls jakarta.servlet.ServletContext.getResourcePaths("/WEB-INF/") and does a DFS for
// subpaths with the above reservations
// - Tomcat does "Scan the classpath" (org.apache.tomcat.util.scan.StandardJarScanner.scanClassPath)
// which navigates up the classloaders and for URLClassLoaders, all java.net.URLClassLoader.getURLs()
@@ -192,7 +192,7 @@ protected TldScanner newTldScanner(ServletContext context, boolean namespaceAwar
// stdtags in WEB-INF/lib, like in $TOMCAT_HOME/webapps/examples/WEB-INF/lib/taglibs-standard-impl-1.2.5.jar
// In Pax Web TldScanner, we:
- // - interpret "JavaEE Platform entries" as everything that's contained in pax-web-jsp bundle. This allows
+ // - interpret "JakartaEE Platform entries" as everything that's contained in pax-web-jsp bundle. This allows
// use to scan for standard tag library TLDs without user bundle's declaration
// - skip standard classloader scanning (traversing up the CL hierarchy) - instead we'll use BundleWiring
// API and ClassPathUtil to get a closure of bundles to be scanned (or in case of WAB, change the process
diff --git a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/JspServlet.java b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/JspServlet.java
index bf609efdfa..cd5fa44b90 100644
--- a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/JspServlet.java
+++ b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/JspServlet.java
@@ -16,16 +16,16 @@
package org.ops4j.pax.web.jsp;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
import org.ops4j.pax.web.service.spi.servlet.OsgiScopedServletContext;
/**
* Pax Web extension of the original {@link org.apache.jasper.servlet.JspServlet} to set proper TCCL, so Jasper
- * can correctly create {@link javax.el.ExpressionFactory}.
+ * can correctly create {@link jakarta.el.ExpressionFactory}.
*/
public class JspServlet extends org.apache.jasper.servlet.JspServlet {
diff --git a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/PaxWebTldScanner.java b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/PaxWebTldScanner.java
index 0a5b47883c..d30ce63b4b 100644
--- a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/PaxWebTldScanner.java
+++ b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/PaxWebTldScanner.java
@@ -25,7 +25,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
-import javax.servlet.ServletContext;
+import jakarta.servlet.ServletContext;
import org.apache.jasper.servlet.TldScanner;
import org.apache.tomcat.util.descriptor.tld.TldResourcePath;
@@ -77,7 +77,7 @@ public void scan() throws IOException, SAXException {
LOG.info("Searching for TLDs in /WEB-INF/");
scanResourcePaths("/WEB-INF/");
- // 4. Tomcat calls javax.servlet.ServletContext.getResourcePaths("/WEB-INF/lib/") and processes
+ // 4. Tomcat calls jakarta.servlet.ServletContext.getResourcePaths("/WEB-INF/lib/") and processes
// all the JARs found, but because WEB-INF/lib/*.jar entries are added to Bundle-ClassPath entry of
// WABs, we're not calling super.scanJars() (thus we don't actually need any JarScanner)
@@ -180,7 +180,7 @@ private void scanBundle(Bundle bundle) throws IOException {
processedBundles.add(b);
}
- // and finally parse all TLDs - the ones from Bundle-ClassPath are parsed first - just as with JavaEE
+ // and finally parse all TLDs - the ones from Bundle-ClassPath are parsed first - just as with JakartaEE
for (URL tld : tldURLs) {
try {
parseTld(new TldResourcePath(tld, null));
diff --git a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/package-info.java b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/package-info.java
index efc2d2bd8a..39ff8ffde3 100644
--- a/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/package-info.java
+++ b/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/package-info.java
@@ -19,7 +19,7 @@
*
* At some point during evolution of Servlet/JSP API specifications, the Servlet container was freed from the
* responsibility of being "JSP container" and the interoperation was delegated to the mechanism of
- * {@link javax.servlet.ServletContainerInitializer}s (SCIs). This package contains one such SCI that prepares
+ * {@link jakarta.servlet.ServletContainerInitializer}s (SCIs). This package contains one such SCI that prepares
* the context (and in Pax Web it is specialized OSGi context) to allow usage of JSPs. The most
* important thing is support for discovering TLD descriptors.
*
diff --git a/pax-web-jsp/src/main/resources/META-INF/services/javax.el.ExpressionFactory b/pax-web-jsp/src/main/resources/META-INF/services/javax.el.ExpressionFactory
index e877165bf6..db4c65ecef 100644
--- a/pax-web-jsp/src/main/resources/META-INF/services/javax.el.ExpressionFactory
+++ b/pax-web-jsp/src/main/resources/META-INF/services/javax.el.ExpressionFactory
@@ -18,5 +18,5 @@ org.apache.el.ExpressionFactoryImpl
# The service-imp-first in this file is because it's required by jakarta.el:jakarta.el-api:3.0.3 and we treat
# it as _canonical_ EL API Jar
-# Its javax.el.FactoryFinder class reads only the first line of this file...
+# Its jakarta.el.FactoryFinder class reads only the first line of this file...
# org.apache.tomcat:tomcat-el skips the comments correctly because it's using generic java.util.ServiceLoader API
diff --git a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/ElTest.java b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/ElTest.java
index 1dd273e11d..8c7df6f6a2 100644
--- a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/ElTest.java
+++ b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/ElTest.java
@@ -16,21 +16,20 @@
*/
package org.ops4j.pax.web.jsp;
-import javax.el.ELContext;
-import javax.el.ELManager;
-import javax.el.ELProcessor;
-import javax.el.ELResolver;
-import javax.el.ExpressionFactory;
-import javax.el.ValueExpression;
-
-import org.junit.Test;
+import jakarta.el.ELContext;
+import jakarta.el.ELManager;
+import jakarta.el.ELProcessor;
+import jakarta.el.ELResolver;
+import jakarta.el.ExpressionFactory;
+import jakarta.el.ValueExpression;
+
+import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
public class ElTest {
@@ -52,26 +51,26 @@ public void elApi() {
// Provides an implementation for creating and evaluating EL expressions.
ExpressionFactory expressionFactory = ExpressionFactory.newInstance();
- assertThat(expressionFactory.getClass().getName(), equalTo("org.apache.el.ExpressionFactoryImpl"));
+ assertThat(expressionFactory.getClass().getName()).isEqualTo("org.apache.el.ExpressionFactoryImpl");
manager.defineBean("model", new Model());
assertNotNull(processor.eval("model"));
assertNull(processor.eval("model.prop"));
processor.eval("model.prop = 'Grzegorz'");
- assertThat(processor.eval("model.prop"), equalTo("Grzegorz"));
- assertThat(processor.eval("model.hello()"), equalTo("Grzegorz"));
- assertThat(processor.eval("model.hello(\"Grzegorz\")"), equalTo("[Grzegorz]"));
+ assertThat((String) processor.eval("model.prop")).isEqualTo("Grzegorz");
+ assertThat((String) processor.eval("model.hello()")).isEqualTo("Grzegorz");
+ assertThat((String) processor.eval("model.hello(\"Grzegorz\")")).isEqualTo("[Grzegorz]");
Model m = (Model) resolver.getValue(context, null, "model");
assertNotNull(m);
- assertThat(m.hello(), equalTo("Grzegorz"));
+ assertThat(m.hello()).isEqualTo("Grzegorz");
// immediate and deferred evaluation - not relevant in plain EL usage. It is relevant in JSP/JSF
ValueExpression ve = expressionFactory.createValueExpression(context, "${model.prop}", String.class);
- assertThat(ve.getValue(context), equalTo("Grzegorz"));
+ assertThat((String) ve.getValue(context)).isEqualTo("Grzegorz");
ve = expressionFactory.createValueExpression(context, "#{model.prop}", String.class);
- assertThat(ve.getValue(context), equalTo("Grzegorz"));
+ assertThat((String) ve.getValue(context)).isEqualTo("Grzegorz");
}
public static class Model {
diff --git a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/JasperJspNoScriptingTest.java b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/JasperJspNoScriptingTest.java
index 9a4d67c317..49c452c343 100644
--- a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/JasperJspNoScriptingTest.java
+++ b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/JasperJspNoScriptingTest.java
@@ -20,17 +20,17 @@
import java.lang.reflect.Constructor;
import java.util.Collection;
import java.util.Collections;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.descriptor.JspConfigDescriptor;
-import javax.servlet.descriptor.JspPropertyGroupDescriptor;
-import javax.servlet.descriptor.TaglibDescriptor;
-import javax.servlet.jsp.JspFactory;
+import jakarta.servlet.Servlet;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.descriptor.JspConfigDescriptor;
+import jakarta.servlet.descriptor.JspPropertyGroupDescriptor;
+import jakarta.servlet.descriptor.TaglibDescriptor;
+import jakarta.servlet.jsp.JspFactory;
import org.apache.commons.io.FileUtils;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.FileSystemResourceLoader;
@@ -39,10 +39,7 @@
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.*;
public class JasperJspNoScriptingTest {
@@ -53,7 +50,7 @@ public class JasperJspNoScriptingTest {
private Servlet jspServlet;
private ServletContext context;
- @BeforeClass
+ @BeforeAll
public static void initStaticDirectly() throws Exception {
JspFactory.setDefaultFactory(new org.apache.jasper.runtime.JspFactoryImpl());
@@ -62,7 +59,7 @@ public static void initStaticDirectly() throws Exception {
FileUtils.cleanDirectory(scratchDir);
}
- @Before
+ @BeforeEach
public void init() throws Exception {
Class> servletClass = Class.forName("org.apache.jasper.servlet.JspServlet");
Constructor> c = servletClass.getConstructor();
@@ -140,6 +137,11 @@ public String getBuffer() {
public String getErrorOnUndeclaredNamespace() {
return "false";
}
+
+ @Override
+ public String getErrorOnELNotFound() {
+ return "false";
+ }
});
}
};
diff --git a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/JasperJspTest.java b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/JasperJspTest.java
index d7be3ec0c4..5c729d1bb1 100644
--- a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/JasperJspTest.java
+++ b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/JasperJspTest.java
@@ -17,16 +17,16 @@
package org.ops4j.pax.web.jsp;
import java.io.File;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.descriptor.JspConfigDescriptor;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.jsp.JspFactory;
+import jakarta.servlet.Servlet;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.descriptor.JspConfigDescriptor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.jsp.JspFactory;
import org.apache.commons.io.FileUtils;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.osgi.framework.Bundle;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -36,9 +36,8 @@
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class JasperJspTest {
@@ -50,7 +49,7 @@ public class JasperJspTest {
private ServletContext context;
private Bundle paxWebJsp;
- @BeforeClass
+ @BeforeAll
public static void initStaticDirectly() throws Exception {
JspFactory.setDefaultFactory(new org.apache.jasper.runtime.JspFactoryImpl());
@@ -59,7 +58,7 @@ public static void initStaticDirectly() throws Exception {
scratchDir.mkdirs();
}
- @Before
+ @BeforeEach
public void init() throws Exception {
jspServlet = new org.apache.jasper.servlet.JspServlet();
@@ -92,7 +91,7 @@ public void simpleJspWithEl() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -109,7 +108,7 @@ public void jspWithElFunctions() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -124,7 +123,7 @@ public void jspWithScripts() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -140,7 +139,7 @@ public void jspWithPageInclude() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -156,7 +155,7 @@ public void jspWithTagFiles() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -167,7 +166,7 @@ public void jspWithTagFiles() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
response = res.getContentAsString();
log.info("Response: {}", response);
diff --git a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/PaxWebJspNoScriptingTest.java b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/PaxWebJspNoScriptingTest.java
index 86bbcc500c..53e572a794 100644
--- a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/PaxWebJspNoScriptingTest.java
+++ b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/PaxWebJspNoScriptingTest.java
@@ -20,17 +20,17 @@
import java.lang.reflect.Constructor;
import java.util.Collection;
import java.util.Collections;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.descriptor.JspConfigDescriptor;
-import javax.servlet.descriptor.JspPropertyGroupDescriptor;
-import javax.servlet.descriptor.TaglibDescriptor;
-import javax.servlet.jsp.JspFactory;
+import jakarta.servlet.Servlet;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.descriptor.JspConfigDescriptor;
+import jakarta.servlet.descriptor.JspPropertyGroupDescriptor;
+import jakarta.servlet.descriptor.TaglibDescriptor;
+import jakarta.servlet.jsp.JspFactory;
import org.apache.commons.io.FileUtils;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.ops4j.pax.web.service.PaxWebConstants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -43,10 +43,7 @@
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -59,7 +56,7 @@ public class PaxWebJspNoScriptingTest {
private Servlet jspServlet;
private ServletContext context;
- @BeforeClass
+ @BeforeAll
public static void initStaticDirectly() throws Exception {
JspFactory.setDefaultFactory(new org.apache.jasper.runtime.JspFactoryImpl());
@@ -68,7 +65,7 @@ public static void initStaticDirectly() throws Exception {
FileUtils.cleanDirectory(scratchDir);
}
- @Before
+ @BeforeEach
public void init() throws Exception {
Class> servletClass = Class.forName("org.apache.jasper.servlet.JspServlet");
Constructor> c = servletClass.getConstructor();
@@ -146,6 +143,11 @@ public String getBuffer() {
public String getErrorOnUndeclaredNamespace() {
return "false";
}
+
+ @Override
+ public String getErrorOnELNotFound() {
+ return "false";
+ }
});
}
};
diff --git a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/PaxWebJspTest.java b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/PaxWebJspTest.java
index 5faf780a7b..9474bc7941 100644
--- a/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/PaxWebJspTest.java
+++ b/pax-web-jsp/src/test/java/org/ops4j/pax/web/jsp/PaxWebJspTest.java
@@ -17,16 +17,16 @@
package org.ops4j.pax.web.jsp;
import java.io.File;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.descriptor.JspConfigDescriptor;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.jsp.JspFactory;
+import jakarta.servlet.Servlet;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.descriptor.JspConfigDescriptor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.jsp.JspFactory;
import org.apache.commons.io.FileUtils;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.ops4j.pax.web.service.PaxWebConstants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -39,9 +39,8 @@
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -55,7 +54,7 @@ public class PaxWebJspTest {
private ServletContext context;
private Bundle paxWebJsp;
- @BeforeClass
+ @BeforeAll
public static void initStaticDirectly() throws Exception {
JspFactory.setDefaultFactory(new org.apache.jasper.runtime.JspFactoryImpl());
@@ -64,7 +63,7 @@ public static void initStaticDirectly() throws Exception {
scratchDir.mkdirs();
}
- @Before
+ @BeforeEach
public void init() throws Exception {
jspServlet = new org.apache.jasper.servlet.JspServlet();
@@ -105,7 +104,7 @@ public void simpleJspWithEl() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -122,7 +121,7 @@ public void jspWithElFunctions() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -137,7 +136,7 @@ public void jspWithScripts() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -153,7 +152,7 @@ public void jspWithPageInclude() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -169,7 +168,7 @@ public void jspWithTagFiles() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
String response = res.getContentAsString();
log.info("Response: {}", response);
@@ -180,7 +179,7 @@ public void jspWithTagFiles() throws Exception {
jspServlet.service(req, res);
- assertThat(res.getStatus(), equalTo(HttpServletResponse.SC_OK));
+ assertThat(res.getStatus()).isEqualTo(HttpServletResponse.SC_OK);
response = res.getContentAsString();
log.info("Response: {}", response);
diff --git a/pax-web-spi/pom.xml b/pax-web-spi/pom.xml
index 04a077139a..72cce919af 100644
--- a/pax-web-spi/pom.xml
+++ b/pax-web-spi/pom.xml
@@ -249,6 +249,11 @@
junit-jupiter-engine
test
+
+ org.assertj
+ assertj-core
+ test
+
org.mockito
mockito-core
diff --git a/pom.xml b/pom.xml
index f6ffba7dd4..db9ba1fd32 100644
--- a/pom.xml
+++ b/pom.xml
@@ -248,10 +248,9 @@
2.3.0
4.22
+ 3.24.2
1.73
-
4.2.1
-
3.32.0
@@ -265,6 +264,7 @@
2.6.1
1.0.3
2.38
+ 3.0.1
3.29.2-GA
1.9.3
@@ -278,6 +278,7 @@
3.21.0
1.15.4
+ 5.9.3
18.0.2
@@ -293,6 +294,7 @@
8.1.0
8.0.0
+ 1.0.1
1.0.1
1.6.1
@@ -311,8 +313,8 @@
9.5
12.0.0
- 1.7.36
- 5.3.27
+ 2.0.7
+ 6.0.9
1.7.1
1.0.1.Final
@@ -718,7 +720,7 @@
- "pax-web own artifacts": org.ops4j.pax.web.* groups
- "OPS4J dependencies": other org.ops4j.* groups
- "OSGi" dependencies: OSGi core, cmpn, Felix, Eclipse OSGi libs, bnd, Karaf, Aries
- - "JavaEE": javax.* APIs (jakarta.* groups), Geronimo specs (to review)
+ - "JakartaEE": javax.* APIs (jakarta.* groups), Geronimo specs (to review)
- "SMX": org.apache.servicemix.bundles and specs groups
- "Logging": logging libraries (excluding pax-logging)
- "Jetty": org.eclipse.jetty.* groups and related dependencies
@@ -1675,14 +1677,30 @@
org.osgi
- org.osgi.service.jakartars
- ${dependency.org.osgi.service.jaxrs}
+ org.osgi.namespace.extender
+ ${dependency.org.osgi.namespace.extender}
+
org.osgi
org.osgi.service.cdi
${dependency.org.osgi.service.cdi}
+
+ org.osgi
+ org.osgi.service.http
+ ${dependency.org.osgi.service.http}
+
+
+ org.osgi
+ org.osgi.service.jakartars
+ ${dependency.org.osgi.service.jaxrs}
+
+
+ org.osgi
+ org.osgi.service.servlet
+ ${dependency.org.osgi.service.servlet}
+
org.osgi
@@ -2108,7 +2126,7 @@
${dependency.org.apache.aries.util}
-
+
jakarta.inject
@@ -2203,6 +2221,11 @@
jakarta.websocket-api
${dependency.jakarta.websocket-api}
+
+ jakarta.websocket
+ jakarta.websocket-client-api
+ ${dependency.jakarta.websocket-api}
+
jakarta.authentication
jakarta.authentication-api
@@ -2260,11 +2283,6 @@
slf4j-api
${dependency.org.slf4j}
-
- org.slf4j
- slf4j-jdk14
- ${dependency.org.slf4j}
-
org.slf4j
jcl-over-slf4j
@@ -2288,7 +2306,7 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
${dependency.org.apache.logging.log4j}
@@ -2431,9 +2449,12 @@
- org.apache.taglibs
- taglibs-standard-impl
- ${dependency.org.apache.taglibs}
+ org.glassfish.web
+ jakarta.servlet.jsp.jstl
+ ${dependency.org.glassfish.web.jsp.jstl}
+
+
+
@@ -3046,9 +3067,17 @@
- junit
- junit
- ${dependency.junit}
+ org.junit
+ junit-bom
+ ${dependency.org.junit}
+ pom
+ import
+
+
+
+ org.assertj
+ assertj-core
+ ${dependency.org.assertj}
org.mockito
@@ -3151,13 +3180,13 @@
-
-
+ pax-web-tomcat
+ pax-web-tomcat-websocket
-
-
+ pax-web-undertow
+ pax-web-undertow-websocket