RE: Re: servlet mapping question

2010-01-14 Thread webpost
ok no problem: - localhost/MyApp/ - returns index.html of the web content directory - localhost/MyApp/*relRef* - MyResourceA (does something with the relative reference *relRef* and return a html representation) - localhost/MyApp/restlet/* - MyResourceB (returns a json representation) best

RE: Re: servlet mapping question

2010-01-14 Thread webpost
thank you! i already tried this and it didn't work. but now i changed the following: TemplateRoute mainroute = router.attach(/, new Directory(getContext(), war:///)); mainrouteroute.setMatchingMod​e(Template.MODE_EQUALS); and this works :)

RE: servlet mapping question

2010-01-13 Thread webpost
Isn't there a possibility to map all other requests (except /restlet/* and /index.html) to a resource? In the end it should be like this: resourceA - localhost/myapp/restlet/* index.html - localhost/myapp/ resourceB - localhost/myapp/* Please help :) hello! I run a restlet application

Re: servlet mapping question

2010-01-13 Thread Thierry Boileau
Hello, I think your question is a matter of configuration of the web.xml file which is specific to jee and not to the Restlet framework. Another solution is to let your Restlet application catch all incoming requests and route them: Router router = new Router(getContext()); // handle the

RE: Re: servlet mapping question

2010-01-13 Thread webpost
thank you very much! I used your solution and it works good. But there is still a small problem: application class: router.attach( /restlet/myresource,MyResourceA.class ); router.attach( /*, MyResourceB.class ); router.attachDefault(new Directory(getContext(), war:///)); I want to call

RE: Re: servlet mapping question

2010-01-13 Thread webpost
I can't get this to work like I want: TemplateRoute route = router.attach( /, MyResourceA.class ); route.setMatchingMode(Template.MODE_STARTS_WITH); router.attachDefault(new Directory(getContext(), war:///)); this always loads MyResourceA, because the main url (localhost/MyApp/) also starts

Re: servlet mapping question

2010-01-13 Thread Thierry Boileau
Hi, could you list the distinct URIs you want to define and their taret (resource, static files, etc) ? Best regards, Thierry Boileau I can't get this to work like I want: TemplateRoute route = router.attach( /, MyResourceA.class ); route.setMatchingMode(Template.MODE_STARTS_WITH);

Re: servlet mapping question

2008-02-29 Thread Thierry Boileau
Hello all, some words to complete Stephan's answer. Let's say that the name of the WAR file is myWar. 1- Let's say that the RestletServlet is configured like this : url-pattern/testServlet/*/url-pattern and the application as follow:

Re: re servlet mapping question

2008-02-29 Thread Thierry Boileau
Hello Ted, some words to complete Stephan's answer. Let's say that the name of the WAR file is myWar. 1- Let's say that the RestletServlet is configured like this : url-pattern/testServlet/*/url-pattern and the application as follow: router.attach(/testResource,HelloWorldResource.class);

RE: Re: re servlet mapping question

2008-02-29 Thread Mitch Stewart
are using IE7, in which case the page will be hidden and you will see a generic 404 error displayed by IE itself). Mitch -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of TA Sent: Friday, February 29, 2008 10:28 AM To: discuss@restlet.tigris.org Subject: Re: re servlet

Re: servlet mapping question

2008-02-28 Thread Stephan Koops
Helo TA, try to request /testServlet/testServlet/*, because you give the testServlet double: one times in the web.xml and one times while attaching to the router. I think, you should remove the testServlet from the attach method. best regards Stephan TA schrieb: New user and I'm playing

Re: re servlet mapping question

2008-02-28 Thread Rhett Sutphin
Hi Ted, On Feb 28, 2008, at 5:11 PM, TA wrote: I'm not sure I follow your suggestion - if I remove the url mapping from the defaultAttach call, all URLs will map to the servlet/restlet and I don't want that because I have other servlets running the web container. What Stephan was pointing