[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] jetty 8 M1 annotation auto discover
|
Hello
I am having some trouble to use the classpath scan. I have a servlet
annotated as followed:
@WebServlet(urlPatterns = "/chat", asyncSupported = true)
public class ChatServlet extends HttpServlet {
If I start jetty 8M1 hightide with a war containing this servlets
inside webapps, the servlet is not mapped and I will get a 404 (in the
absence of a web.xml or even with a web.xml only declaring the webapp
and the 3.0dtd)
If I put an pretty simple web.xml inside, declaring:
<servlet>
<servlet-name>X</servlet-name>
<servlet-class>packagename.ChatServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>X</servlet-name>
<url-pattern>/chat</url-pattern>
</servlet-mapping>
It works.
Shouldnt these configurations inside hightide be enough for the
classpath scanning?
<Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
<Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
<Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
<Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
<Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
<Item>org.eclipse.jetty.plus.webapp.Configuration</Item>
<Item>org.eclipse.jetty.annotations.AnnotationConfiguration</Item>
<Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
<Item>org.eclipse.jetty.annotations.ContainerInitializerConfiguration
--
Paulo Silveira
Caelum | Ensino e Inovação
www.caelum.com.br
www.arquiteturajava.com.br