I'm using 1.0.2 The very strange thing is that I have a previous version of my app and the 2 servlets are working perfectly. (I can prove it with a war) :)
But I can't find the differences. The web.xml is the same The .class files are the same. I tried the war on another tomcat (on a Linux box) as well, just to be sure it's not a problem on my machine. I get the same "404 error". Btw, who is sending this error? The restlet framework ? Is there a way to get more information during the execution of the framework ? -- Julien Balas JDAS Rennes -----Message d'origine----- De : Jerome Louvel [mailto:[EMAIL PROTECTED] Envoyé : jeudi 5 juillet 2007 15:46 À : [email protected] Objet : Re: Multiples rest service using multiples servlet in tomcat. Hi Julien, Which version of Restlet are you using? There was a related bug fixed in 1.0.2: - Fixed bug in ServletConverter causing the caching of the base URI and inability to handle requests with various base URI style (IP address and domain names for example). Report by Ryan Daum. Best regards, Jerome Balas Julien a écrit : > > Hi > I'm trying to have 2 servlets using 2 restlet in order to provide 2 > REST services in the same tomcat. > But I have a strange behavior. > The first Servlet called works perfectly, but not the second one. > For the second one, I get a "404 error", but not a "tomcat 404". > If a call a non existing servlet I got a "tomcat 404", but my error is > not this one, the message is "*The server has not found anything > matching the request URI* You can get technical details here. > Please continue your visit at our home page. " > > I tried to isolate as much as possible the issue, with a minimal > example of 2 "Hello world" restlet. > The full war (600Ko) is available at > _http://julien.balas.free.fr/EventViewer.war_ > If anybody has a idea...... > I guess it's a config issue because each servlet/restlet is working > great if alone in a tomcat. > > > The 2 classes are very minimal > --------------------- > [package and imports] > public class Hello1 extends Application { public Hello1() { super(); } > public Hello1(Context parentContext) { super(parentContext); } public > Restlet createRoot() { Restlet restlet = new Restlet(getContext()) { > @Override public void handle(Request request, Response response) { > response.setEntity(new StringRepresentation(this.getClass().getName(), > MediaType.TEXT_HTML)); > } > }; > return restlet; > } > } > ------------------------ > The tomcat Logs are below > - server startup > - a successful call to "rest2" service > - a 404 on "rest1" service > - another successful call to "rest2" service > > INFO: Server startup in 4587 ms > 5 juil. 2007 15:15:12 com.noelios.restlet.LogFilter afterHandle > INFO: 2007-07-05 15:15:12 172.23.34.19 - 172.23.34.19 8180 GET > /EventViewer/rest2/456 - 200 42 - 10 _http://172.23.34.19:8180_ > Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) > Gecko/20070515 Firefox/2.0.0.4 - > > 5 juil. 2007 15:15:16 com.noelios.restlet.LogFilter afterHandle > INFO: 2007-07-05 15:15:16 172.23.34.19 - 172.23.34.19 8180 GET > /EventViewer/rest1/456 - 404 331 - 0 _http://172.23.34.19:8180_ > Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) > Gecko/20070515 Firefox/2.0.0.4 - > > 5 juil. 2007 15:15:37 com.noelios.restlet.LogFilter afterHandle > INFO: 2007-07-05 15:15:37 172.23.34.19 - 172.23.34.19 8180 GET > /EventViewer/rest2/456 - 200 42 - 0 _http://172.23.34.19:8180_ > Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) > Gecko/20070515 Firefox/2.0.0.4 - > > -- > Julien Balas > JDAS Rennes >

