Fix test-spec test for new annotation added.
This commit is contained in:
parent
2fb23e705c
commit
9b57f9e29a
|
@ -209,6 +209,7 @@ public class AnnotationTest extends HttpServlet
|
|||
|
||||
__HandlesTypes = Arrays.asList( "javax.servlet.GenericServlet",
|
||||
"javax.servlet.http.HttpServlet",
|
||||
"com.acme.AsyncListenerServlet",
|
||||
"com.acme.AnnotationTest",
|
||||
"com.acme.RoleAnnotationTest",
|
||||
"com.acme.MultiPartTest",
|
||||
|
|
|
@ -98,6 +98,7 @@ public class AsyncListenerServlet extends HttpServlet
|
|||
|
||||
PrintWriter writer = resp.getWriter();
|
||||
writer.println( "<html>");
|
||||
writer.println("<HEAD><link rel=\"stylesheet\" type=\"text/css\" href=\"../stylesheet.css\"/></HEAD>");
|
||||
writer.println( "<body>");
|
||||
writer.println("<h1>AsyncListener</h2>");
|
||||
writer.println("<pre>");
|
||||
|
@ -107,14 +108,14 @@ public class AsyncListenerServlet extends HttpServlet
|
|||
writer.println("private void postConstruct ()");
|
||||
writer.println("{}");
|
||||
writer.println("</pre>");
|
||||
writer.println("<br/><b>Result: "+listener.isPostConstructCalled()+"</b>");
|
||||
writer.println("<br/><b>Result: "+(listener.isPostConstructCalled()?"<span class=\"pass\">PASS</span>":"<span class=\"fail\">FAIL</span>")+"</b>");
|
||||
|
||||
writer.println("<h2>@Resource Injection for env-entry </h2>");
|
||||
writer.println("<pre>");
|
||||
writer.println("@Resource(mappedName=\"maxAmount\")");
|
||||
writer.println("private Double maxAmount;");
|
||||
writer.println("</pre>");
|
||||
writer.println("<br/><b>Result: "+(listener.isResourceInjected()?" PASS":" FAIL")+"</b>");
|
||||
writer.println("<br/><b>Result: "+(listener.isResourceInjected()?" <span class=\"pass\">PASS</span>":" <span class=\"FAIL\">FAIL</span>")+"</b>");
|
||||
|
||||
writer.println( "</body>");
|
||||
writer.println( "</html>");
|
||||
|
|
|
@ -54,6 +54,12 @@ Test of the annotation:
|
|||
<input TYPE="submit" VALUE="Test Upload">
|
||||
</form>
|
||||
|
||||
<h3>AsyncListener Resource Injection</h3>
|
||||
<p>Click the following link to test that javax.servlet.AsyncListeners are injectable</p>
|
||||
<form action="asy/xx" method="post">
|
||||
<button type="submit">Test AsyncListener</button>
|
||||
</form>
|
||||
|
||||
<center>
|
||||
<hr/>
|
||||
<a href="http://www.eclipse.org/jetty"><img style="border:0" src="images/small_powered_by.gif"/></a>
|
||||
|
|
Loading…
Reference in New Issue