<div class="gmail_quote">On Fri, Oct 1, 2010 at 9:44 AM, Pete Muir <span dir="ltr"><<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 1 Oct 2010, at 10:48, Sreekanth wrote:<br>
<br>
> Hi,<br>
><br>
> I am running the core tests from the workspace against glassfish.I have these question related to 2 tests.<br>
><br>
> In the test, org.jboss.weld.tests.scope.RemoteScopeTest, there is a servlet by name RemoteClient using the annotation "@WebServlet("*")".<br>
<br>
</div>Not sure, but it's always worked with Tomcat/JBossWeb. I guess Grizzly doesn't support this?<br>
<div class="im"><br>
><br>
><br>
> In the test resource.EMFFactoryTest, there are 3 servlets EMFConsumerTest1, EMFConsumerTest2, EMFConsumerTest3 which uses the annotation @WebServlet("emfconsumer") with out a leading "/" .<br>
><br>
> Are these 2 test cases valid with respect to servlet specification?I guess these need to be rectified.Please comment.<br>
<br>
</div>As above?<br></blockquote><div><br></div><div>According to 12.2 of the Servlet 3.0 specification (not likely to have changed since prior versions)</div><div><br></div><div><div>In the Web application deployment descriptor, the following syntax is used to define</div>
<div>mappings:</div><div><ul><li>A string beginning with a ‘/’ character and ending with a ‘/*’ suffix is used for path mapping.</li><li>A string beginning with a ‘*.’ prefix is used as an extension mapping.</li><li>The empty string ("") is a special URL pattern that exactly maps to the application's context root, i.e., requests of the form http://host:port/<context-root>/. In this case the path info is ’/’ and the servlet path and context path is empty string (““).</li>
<li>A string containing only the ’/’ character indicates the "default" servlet of that application. In this case the servlet path is the request URI minus the context path and the path info is null.</li><li>All other strings are used for exact matches only.</li>
</ul></div></div><div>So a * path and a path without a slash are likely only JBoss AS friendly.</div><div><br></div><div>-Dan</div><div><br></div></div>-- <br>Dan Allen<br>Principal Software Engineer, Red Hat | Author of Seam in Action<br>
Registered Linux User #231597<br><br><a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
<a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><br>