clazz) throws ServletException
- {
+ {
+ ContextHandler contextHandler = state().getContextHandler();
+ if (contextHandler != null)
+ return contextHandler.getServletContext().createListener(clazz);
try
{
return clazz.newInstance();
}
- catch(Exception e)
+ catch (Exception e)
{
throw new ServletException(e);
}
}
-
+
@Override
public void dispatch()
{
diff --git a/jetty-start/src/main/resources/org/eclipse/jetty/start/start.config b/jetty-start/src/main/resources/org/eclipse/jetty/start/start.config
index 4dde6bfb2cd..5837685c09e 100644
--- a/jetty-start/src/main/resources/org/eclipse/jetty/start/start.config
+++ b/jetty-start/src/main/resources/org/eclipse/jetty/start/start.config
@@ -92,7 +92,7 @@ $(jetty.home)/lib/jetty-io-$(version).jar ! available org.eclipse.jetty.io.Buf
$(jetty.home)/lib/jetty-xml-$(version).jar ! available org.eclipse.jetty.xml.XmlParser
[Server,All,server,default]
-$(jetty.home)/lib/servlet-api-3.0.jar ! available javax.servlet.ServletContext
+$(jetty.home)/lib/servlet-api-3.1.jar ! available javax.servlet.ServletContext
$(jetty.home)/lib/jetty-http-$(version).jar ! available org.eclipse.jetty.http.HttpParser
$(jetty.home)/lib/jetty-continuation-$(version).jar ! available org.eclipse.jetty.continuation.Continuation
$(jetty.home)/lib/jetty-server-$(version).jar ! available org.eclipse.jetty.server.Server
diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/AnnotationTest.java b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/AnnotationTest.java
index b3eecea8535..e4b1220534d 100644
--- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/AnnotationTest.java
+++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/AnnotationTest.java
@@ -307,10 +307,15 @@ public class AnnotationTest extends HttpServlet
context = request.getContextPath();
if (!context.endsWith("/"))
context += "/";
- context += "sec/foo";
- out.println("");
-
+ String path = context +"sec/foo";
+
+ out.println("");
+ out.println("AsyncListener Resource Injection
");
+ out.println("Click the following link to test that javax.servlet.AsyncListeners are injectable
");
+ path = context+"asy/xx";
+ out.println("");
+
out.println("