Hi Philippe, To complete Stephan's answer, the ServerServlet is a Restlet specific class that is leveraged by our JAX-RS implementation. It also works with classic Restlet application hence it follows our own convention.
BTW, the parameter name you want to use in your web.xml is "org.restlet.application" and not "org.restlet.attribute.application"! Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : stephan.ko...@web.de [mailto:stephan.ko...@web.de] Envoyé : mercredi 15 avril 2009 09:30 À : discuss@restlet.tigris.org Objet : Re: restlet as a jax-rs implementation Hi Philippe, is "prefix" also the @Path on your root resource class? Than you have to use only "/*" as url-pattern. To your first question I can't answer, because of my missing time other ones worked on the JAX-RS extension. best regards Stephan > Hi > > > I have an existing jax-rs application and would like to use restlet as > an implementation. My web.xml currently looks like this: > > <servlet> > <servlet-name>RestletServlet</servlet-name> > > <servlet-class>com.noelios.restlet.ext.servlet.ServerServlet</servlet-class> > <init-param> > <param-name>org.restlet.attribute.application</param-name> > <param-value>com.acme.MyApplication</param-value> > </init-param> > </servlet> > > <servlet-mapping> > <servlet-name>RestletServlet</servlet-name> > <url-pattern>/prefix/*</url-pattern> > </servlet-mapping> > > com.acme.MyApplication is a suclass of javax.ws.rs.core.Application. > So here's my first question, why is the init parameter called > "org.restlet.attribute.application" and not "javax.ws.rs.Application" > like spec says? Second the servlet is not mapped to the context path > but a subpath. This does not seem to work out of the box, I'm getting 404s. > Is there some way this has to be configured like in RESTeasy? ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=17231 44 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1742564