Hello,
I am using restlet 1.2M2 in the TomCat 6 web container. I am trying to create 
multiple Restlet applications and define different URI patterns that map to 
each one. I tried to do this following all the Restlet examples posted and it 
seems that all the examples show how to handle only one application in the 
web.xml
I found an example referring to restlet.xml and defining Components. I can't 
seem to get this to work. I am attaching my web.xml and restlet.xml and would 
truly appreciate it if someone can tell me why I am getting a 404 error when I 
try to access either of the following URLs:
http://localhost:8080/SampleRest/FirstResourceApplication/items
http://localhost:8080/SampleRest/FirstStepsApplication

web.xml content:
----------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns="http://java.sun.com/xml/ns/javaee"; 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
        id="WebApp_ID" version="2.5">

        <display-name>SampleRest</display-name>

        <!-- 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>

restlet.xml content:
--------------------
<?xml version="1.0"?>
<component xmlns="http://www.restlet.org/schemas/1.2/Component";>
  <server protocols="HTTP"/>
  
  <defaultHost>
    <attach uriPattern="/FirstResourceApplication/*" 
targetClass="sample.reslet.applications.FirstResourceApplication" />
    <attach uriPattern="/FirstStepsApplication/*" 
targetClass="sample.reslet.applications.FirstStepsApplication" />
  </defaultHost>
</component>

Thank you
-- 
View this message in context: 
http://n2.nabble.com/Multiple-Application-Handling-in-web.xml-and-restlet.xml-tp2599100p2599100.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply via email to