Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2015-07-01 03:12:30 -0400
committerJan Bartel2015-07-01 03:12:30 -0400
commita87823930a5b476b0090ba3c9323de23f4eb83b2 (patch)
tree94a2b6008fcb0e90294c06ff119ba0de598eb520 /apache-jstl
parent13ce021e5e8a527dd6f8c08a20a28b3008c1151a (diff)
downloadorg.eclipse.jetty.project-a87823930a5b476b0090ba3c9323de23f4eb83b2.tar.gz
org.eclipse.jetty.project-a87823930a5b476b0090ba3c9323de23f4eb83b2.tar.xz
org.eclipse.jetty.project-a87823930a5b476b0090ba3c9323de23f4eb83b2.zip
471464 Parsing issues with HttpURI
Fixed surefire config that needs to use an isolated classloader, not a manifest classpath.
Diffstat (limited to 'apache-jstl')
-rw-r--r--apache-jstl/pom.xml8
-rw-r--r--apache-jstl/src/test/java/org/eclipse/jetty/jstl/JspConfig.java42
-rw-r--r--apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java9
3 files changed, 19 insertions, 40 deletions
diff --git a/apache-jstl/pom.xml b/apache-jstl/pom.xml
index e736270bcc..4f15a906ef 100644
--- a/apache-jstl/pom.xml
+++ b/apache-jstl/pom.xml
@@ -15,6 +15,14 @@
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
diff --git a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JspConfig.java b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JspConfig.java
index 45126d19d9..3ca87d679c 100644
--- a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JspConfig.java
+++ b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JspConfig.java
@@ -44,47 +44,9 @@ public class JspConfig
public static void init(WebAppContext context, URI baseUri, File scratchDir)
{
context.setAttribute("javax.servlet.context.tempdir", scratchDir);
+ context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",
+ ".*/javax.servlet-[^/]*\\.jar$|.*/servlet-api-[^/]*\\.jar$|.*javax.servlet.jsp.jstl-[^/]*\\.jar|.*taglibs-standard-impl-.*\\.jar");
context.setWar(baseUri.toASCIIString());
context.setResourceBase(baseUri.toASCIIString());
-
- // Set JSP to use Standard JavaC always
- System.setProperty("org.apache.jasper.compiler.disablejsr199", "false");
-
- // Container Initializers for JSP
- context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",
- ".*/[^/]*servlet-api-[^/]*\\.jar$|.*/javax.servlet.jsp.jstl-.*\\.jar$|.*/.*taglibs.*\\.jar$");
-
- JettyJasperInitializer sci = new JettyJasperInitializer();
- ContainerInitializer initializer = new ContainerInitializer(sci, null);
- List<ContainerInitializer> initializers = new ArrayList<ContainerInitializer>();
- initializers.add(initializer);
-
- context.setAttribute("org.eclipse.jetty.containerInitializers", initializers);
- context.addBean(new ServletContainerInitializersStarter(context), true);
-
- // Apache Jasper JSP specific instance management
- context.setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager());
-
- // Class Loader requirements for JSP
- ClassLoader jspClassLoader = new URLClassLoader(new URL[0], context.getClass().getClassLoader());
- context.setClassLoader(jspClassLoader);
-
- // JSP Servlet
- ServletHolder holderJsp = new ServletHolder("jsp", JettyJspServlet.class);
- holderJsp.setInitOrder(0);
- holderJsp.setInitParameter("logVerbosityLevel", "DEBUG");
- holderJsp.setInitParameter("fork", "false");
- holderJsp.setInitParameter("xpoweredBy", "false");
- holderJsp.setInitParameter("compilerTargetVM", "1.8");
- holderJsp.setInitParameter("compilerSourceVM", "1.8");
- holderJsp.setInitParameter("keepgenerated", "true");
- context.addServlet(holderJsp, "*.jsp");
-
- // Default Servlet
- ServletHolder holderDefault = new ServletHolder("default", DefaultServlet.class);
- holderDefault.setInitParameter("resourceBase", baseUri.toASCIIString());
- holderDefault.setInitParameter("dirAllowed", "true");
-
- context.addServlet(holderDefault, "/");
}
}
diff --git a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java
index b8d3a7413b..06790be058 100644
--- a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java
+++ b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java
@@ -31,6 +31,7 @@ import org.eclipse.jetty.toolchain.test.FS;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.eclipse.jetty.toolchain.test.SimpleRequest;
import org.eclipse.jetty.webapp.WebAppContext;
+import org.eclipse.jetty.webapp.Configuration;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -51,6 +52,14 @@ public class JstlTest
// Setup WebAppContext
File testWebAppDir = MavenTestingUtils.getProjectDir("src/test/webapp");
+
+ Configuration.ClassList classlist = Configuration.ClassList
+ .setServerDefault(server);
+
+ classlist.addBefore(
+ "org.eclipse.jetty.webapp.JettyWebXmlConfiguration",
+ "org.eclipse.jetty.annotations.AnnotationConfiguration");
+
WebAppContext context = new WebAppContext();
context.setContextPath("/");

Back to the top