users@jersey.java.net

Re: [Jersey] serving helloworld-webapp in jetty

From: Craig McClanahan <Craig.McClanahan_at_Sun.COM>
Date: Tue, 03 Mar 2009 15:45:58 -0800

Meredith Gregory wrote:
> Hi,
>
> As a part of an effort to put Jersey into a larger context, i'm
> attempting to run the helloworld-webapp sample using jersey instead of
> glassfish. My web.xml is below. When i run it all starts up without a
> hitch. Jersey finds the resource classes. Further, it's clear that the
> server is eating the requests. But we never hit the get method of the
> resource class. Any help would be greatly appreciated.
What is it that makes it clear that "the server is eating up the
requests"? What kind of errors do you get back? Could you also show us
a snippet of your resource class (particularly the @Path and @GET
annotation stuff), and an example of the request your client is making?

Craig
>
> Best wishes,
>
> --greg
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <web-app>
> <!-- <filter> -->
> <!-- <filter-name>JerseyFilter</filter-name> -->
> <!-- <display-name>Jersey Filter</display-name> -->
> <!-- <description>Attempting to use Jersey as a Filter</description> -->
> <!--
> <filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class>
> -->
> <!-- <init-param> -->
> <!--
> <param-name>com.sun.jersey.config.property.packages</param-name> -->
> <!--
> <param-value>com.sap.dspace.model.constellation.resources</param-value>
> -->
> <!-- </init-param> -->
> <!-- </filter> -->
> <!-- <filter> -->
> <!-- <filter-name>LiftFilter</filter-name> -->
> <!-- <display-name>Lift Filter</display-name> -->
> <!-- <description>The Filter that intercepts lift
> calls</description> -->
> <!-- <filter-class>net.liftweb.http.LiftFilter</filter-class> -->
> <!-- </filter> -->
>
> <!-- <filter-mapping> -->
> <!-- <filter-name>JerseyFilter</filter-name> -->
> <!-- <url-pattern>/*</url-pattern> -->
> <!-- </filter-mapping> -->
> <!-- <filter-mapping> -->
> <!-- <filter-name>LiftFilter</filter-name> -->
> <!-- <url-pattern>/*</url-pattern> -->
> <!-- </filter-mapping> -->
> <servlet>
> <servlet-name>Jersey Web Application</servlet-name>
>
> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
> <init-param>
>
> <param-name>com.sun.jersey.config.property.packages</param-name>
>
> <param-value>com.sap.dspace.model.constellation.resources</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>Jersey Web Application</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
> </web-app>
>
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 806 55th St NE
> Seattle, WA 98105
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com