users@jersey.java.net

serving helloworld-webapp in jetty

From: Meredith Gregory <lgreg.meredith_at_gmail.com>
Date: Tue, 3 Mar 2009 15:02:55 -0800

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.

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