Skip to content

Commit b9f3e03

Browse files
committed
[#1802] Switch pax-web-itest-jsp from javax to jakarta
1 parent 95d42dc commit b9f3e03

File tree

9 files changed

+41
-70
lines changed

9 files changed

+41
-70
lines changed

pax-web-itest/pax-web-itest-jsp/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
<artifactId>osgi.core</artifactId>
129129
</dependency>
130130

131-
<!-- JavaEE (the packages not re-exported by pax-web-jsp) -->
131+
<!-- JakartaEE (the packages not re-exported by pax-web-jsp) -->
132132

133133
<dependency>
134134
<groupId>jakarta.el</groupId>

pax-web-itest/pax-web-itest-jsp/src/main/java/org/ops4j/pax/web/test/tags/TestTag.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
package org.ops4j.pax.web.test.tags;
1717

1818
import java.io.IOException;
19-
import javax.servlet.jsp.JspException;
20-
import javax.servlet.jsp.tagext.TagSupport;
19+
import jakarta.servlet.jsp.JspException;
20+
import jakarta.servlet.jsp.tagext.TagSupport;
2121

2222
public class TestTag extends TagSupport {
2323

pax-web-itest/pax-web-itest-jsp/src/test/java/org/ops4j/pax/web/test/jsp/ElIntegrationTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
package org.ops4j.pax.web.test.jsp;
1818

1919
import java.util.ServiceLoader;
20-
import javax.el.ELContext;
21-
import javax.el.ELManager;
22-
import javax.el.ELProcessor;
23-
import javax.el.ELResolver;
24-
import javax.el.ExpressionFactory;
25-
import javax.el.ValueExpression;
20+
import jakarta.el.ELContext;
21+
import jakarta.el.ELManager;
22+
import jakarta.el.ELProcessor;
23+
import jakarta.el.ELResolver;
24+
import jakarta.el.ExpressionFactory;
25+
import jakarta.el.ValueExpression;
2626

2727
import org.junit.Test;
2828
import org.slf4j.Logger;

pax-web-itest/pax-web-itest-jsp/src/test/java/org/ops4j/pax/web/test/jsp/PaxWebCustomTldIntegrationTest.java

+13-8
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
import java.lang.reflect.Method;
2222
import java.util.Collection;
2323
import java.util.Collections;
24-
import javax.servlet.Servlet;
25-
import javax.servlet.ServletContainerInitializer;
26-
import javax.servlet.ServletContext;
27-
import javax.servlet.descriptor.JspConfigDescriptor;
28-
import javax.servlet.descriptor.JspPropertyGroupDescriptor;
29-
import javax.servlet.descriptor.TaglibDescriptor;
30-
import javax.servlet.http.HttpServletResponse;
24+
import jakarta.servlet.Servlet;
25+
import jakarta.servlet.ServletContainerInitializer;
26+
import jakarta.servlet.ServletContext;
27+
import jakarta.servlet.descriptor.JspConfigDescriptor;
28+
import jakarta.servlet.descriptor.JspPropertyGroupDescriptor;
29+
import jakarta.servlet.descriptor.TaglibDescriptor;
30+
import jakarta.servlet.http.HttpServletResponse;
3131

3232
import org.apache.commons.io.FileUtils;
3333
import org.junit.Before;
@@ -68,7 +68,7 @@ public class PaxWebCustomTldIntegrationTest {
6868
@BeforeClass
6969
@SuppressWarnings("JavaReflectionInvocation")
7070
public static void initStatic() throws Exception {
71-
Class<?> jspFactoryClass = Class.forName("javax.servlet.jsp.JspFactory");
71+
Class<?> jspFactoryClass = Class.forName("jakarta.servlet.jsp.JspFactory");
7272
Method setDefaultFactory = jspFactoryClass.getDeclaredMethod("setDefaultFactory", jspFactoryClass);
7373
Class<?> jspFactoryImplClass = Class.forName("org.apache.jasper.runtime.JspFactoryImpl");
7474
setDefaultFactory.invoke(null, jspFactoryClass.cast(jspFactoryImplClass.getConstructor().newInstance()));
@@ -168,6 +168,11 @@ public String getBuffer() {
168168
public String getErrorOnUndeclaredNamespace() {
169169
return "false";
170170
}
171+
172+
@Override
173+
public String getErrorOnELNotFound() {
174+
return "false";
175+
}
171176
});
172177
}
173178
};

pax-web-itest/pax-web-itest-jsp/src/test/java/org/ops4j/pax/web/test/jsp/PaxWebJspIntegrationTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
import java.io.File;
2020
import java.lang.reflect.Constructor;
2121
import java.lang.reflect.Method;
22-
import javax.servlet.Servlet;
23-
import javax.servlet.ServletContainerInitializer;
24-
import javax.servlet.ServletContext;
25-
import javax.servlet.descriptor.JspConfigDescriptor;
26-
import javax.servlet.http.HttpServletResponse;
22+
import jakarta.servlet.Servlet;
23+
import jakarta.servlet.ServletContainerInitializer;
24+
import jakarta.servlet.ServletContext;
25+
import jakarta.servlet.descriptor.JspConfigDescriptor;
26+
import jakarta.servlet.http.HttpServletResponse;
2727

2828
import org.apache.commons.io.FileUtils;
2929
import org.junit.Before;
@@ -64,7 +64,7 @@ public class PaxWebJspIntegrationTest {
6464
@BeforeClass
6565
@SuppressWarnings("JavaReflectionInvocation")
6666
public static void initStatic() throws Exception {
67-
Class<?> jspFactoryClass = Class.forName("javax.servlet.jsp.JspFactory");
67+
Class<?> jspFactoryClass = Class.forName("jakarta.servlet.jsp.JspFactory");
6868
Method setDefaultFactory = jspFactoryClass.getDeclaredMethod("setDefaultFactory", jspFactoryClass);
6969
Class<?> jspFactoryImplClass = Class.forName("org.apache.jasper.runtime.JspFactoryImpl");
7070
setDefaultFactory.invoke(null, jspFactoryClass.cast(jspFactoryImplClass.getConstructor().newInstance()));

pax-web-itest/pax-web-itest-jsp/src/test/java/org/ops4j/pax/web/test/jsp/PaxWebJspNoScriptingIntegrationTest.java

+12-7
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
import java.util.Collection;
2323
import java.util.Collections;
2424
import java.util.UUID;
25-
import javax.servlet.Servlet;
26-
import javax.servlet.ServletContainerInitializer;
27-
import javax.servlet.ServletContext;
28-
import javax.servlet.descriptor.JspConfigDescriptor;
29-
import javax.servlet.descriptor.JspPropertyGroupDescriptor;
30-
import javax.servlet.descriptor.TaglibDescriptor;
25+
import jakarta.servlet.Servlet;
26+
import jakarta.servlet.ServletContainerInitializer;
27+
import jakarta.servlet.ServletContext;
28+
import jakarta.servlet.descriptor.JspConfigDescriptor;
29+
import jakarta.servlet.descriptor.JspPropertyGroupDescriptor;
30+
import jakarta.servlet.descriptor.TaglibDescriptor;
3131

3232
import org.junit.Before;
3333
import org.junit.BeforeClass;
@@ -61,7 +61,7 @@ public class PaxWebJspNoScriptingIntegrationTest {
6161

6262
@BeforeClass
6363
public static void initStatic() throws Exception {
64-
Class<?> jspFactoryClass = Class.forName("javax.servlet.jsp.JspFactory");
64+
Class<?> jspFactoryClass = Class.forName("jakarta.servlet.jsp.JspFactory");
6565
Method setDefaultFactory = jspFactoryClass.getDeclaredMethod("setDefaultFactory", jspFactoryClass);
6666
Class<?> jspFactoryImplClass = Class.forName("org.apache.jasper.runtime.JspFactoryImpl");
6767
setDefaultFactory.invoke(null, jspFactoryClass.cast(jspFactoryImplClass.getConstructor().newInstance()));
@@ -147,6 +147,11 @@ public String getBuffer() {
147147
public String getErrorOnUndeclaredNamespace() {
148148
return "false";
149149
}
150+
151+
@Override
152+
public String getErrorOnELNotFound() {
153+
return "false";
154+
}
150155
});
151156
}
152157
};

pax-web-jsp/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
{maven-dependencies}
201201
</Include-Resource>
202202
<Embed-Dependency>
203-
artifactId=taglibs-standard-impl;inline=**/*.tld
203+
artifactId=jakarta.servlet.jsp.jstl;inline=**/*.tld
204204
</Embed-Dependency>
205205
<_nouses>true</_nouses>
206206
<_contract>!*</_contract>

pax-web-jsp/src/main/resources/META-INF/services/javax.el.ExpressionFactory

-22
This file was deleted.

pax-web-jsp/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer

-17
This file was deleted.

0 commit comments

Comments
 (0)