users@jersey.java.net

using Jersey in Jetty

From: Amir Pourteymour <pourteymour_at_gmail.com>
Date: Mon, 9 Feb 2009 16:09:50 -0500

Hi,
I am planning to configure Jersey inside Jetty, so here is the block I added
to web.xml of my project:

I was wondering if my configuration is right, because I am getting HTTP
ERROR 404.

HTTP ERROR: 404

NOT_FOUND

RequestURI=/*myWeb*/rest/employees/asdf/asdf


===============web.xml========

<?xml version="1.0" encoding="UTF-8"?>

<web-app id="WebApp_ID" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>myWeb</display-name>

      <display-name>restSample</display-name>
      <servlet>
            <servlet-name>JerseyServlet</servlet-name>

<servlet-class>com.sun.ws.rest.spi.container.servlet.ServletContainer</servlet-class>
                 <init-param>

<param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>

<param-value>com.sun.jersey.api.core.PackagesResourceConfig</param-value>
                 </init-param>
                 <init-param>

<param-name>com.sun.jersey.config.property.packages</param-name>
                      <param-value>com.myApp.rest</param-value>
                  </init-param>
            <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
            <servlet-name>JerseyServlet</servlet-name>
            <url-pattern>/rest/*</url-pattern>
      </servlet-mapping>

<welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
</web-app>

, after deploying myApp.rest, I would like to call my POST upon entering
this address :* http://localhost:8080/myWeb/rest/*employees/...


thanks,
Amir