Hi all,

I have an application running on Tomcat with a 'pure' Restlet web app, but I'm 
having problems with the JAX-RS extension.

I'm following the directions on the tutorial at 
http://wiki.restlet.org/docs_2.0/13-restlet/28-restlet/57-restlet.html along 
with the suggested web.xml in the first comment. The application works when I 
run 'ExampleServer' starting a Jetty server on 8182, but does not work in 
Tomcat 7.0.14 on Ubuntu 11.10. I can't see what's wrong with my web.xml.

In package restlettest, I have four files: EasyRootResource, 
ExampleApplication, ExampleServer, and MyJaxRsApplication. All of the code in 
those classes is identical to the tutorial. Then I have my 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>first steps servlet</display-name>
<!-- Application class name -->
    <context-param>
        <param-name>org.restlet.ext.jaxrs.JaxRsApplication</param-name>
        <param-value>restlettest.MyJaxRsApplication</param-value>
    </context-param>

<!-- Restlet adapter -->
    <servlet>
        <servlet-name>RestletServlet</servlet-name>
        <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
    </servlet>

<!-- Catch all requests -->
    <servlet-mapping>
        <servlet-name>RestletServlet</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
</web-app> 

When I drop it into my Tomcat instance, there are no error messages in any of 
the log files. When I navigate to 
http://localhost:8181/jaxrs-restlet-test-1.0-SNAPSHOT/easy (8181 is my Tomcat 
instance), I get a 404 not found error.

I've zipped my test project up and put it online at 
http://dl.dropbox.com/u/4048178/jaxrs-restlet-test.zip . It's a maven project, 
so you can build it yourself or you can use the war that was compiled in the 
target directory.

I would really appreciate any insight that you could provide with this.
--
Morgan Taschuk 
Bioinformatics Pipeline Developer 
Mobile: 647-926-9809

Ontario Institute for Cancer Research   
MaRS Centre, South Tower
101 College Street, Suite 800
Toronto, Ontario, Canada M5G 0A3

Toll-free: 1-866-678-6427
www.oicr.on.ca

This message and any attachments may contain confidential and/or privileged 
information for the sole use of the intended recipient. Any review or 
distribution by anyone other than the person for whom it was originally 
intended is strictly prohibited. If you have received this message in error, 
please contact the sender and delete all copies. Opinions, conclusions or other 
information contained in this message may not be that of the organization.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2878378

Reply via email to