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:
router.attach("/testResource",HelloWorldResource.class);
then, the resource'URI is something like this:
http://localhost/myWar/testServlet/testResource
1- Let's say that the RestletServlet is configured like this :
<url-pattern>/*</url-pattern>
and the application as follow:
router.attach("/testResource",HelloWorldResource.class);
then, the resource'URI is something like this:
http://localhost/myWar/testResource
best regards,
Thierry Boileau
On Thu, Feb 28, 2008 at 11:21 PM, Stephan Koops <[EMAIL PROTECTED]> wrote:
> 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 around with the firstStepsApplication using it in a
> > tomcat web container.
> >
> > I'm trying to play with the routing.
> >
> > Instead of
> >
> > Router router = new Router(getContext());
> > router.attachDefault(HelloWorldResource.class);
> >
> > I'm trying to do
> >
> > router.attach("/testServlet",HelloWorldResource.class);
> >
> > and correspondingly, I've changed the entry in web.xml
> >
> > from
> >
> > <servlet-mapping>
> > <servlet-name>RestletServlet</servlet-name>
> > <url-pattern>/*</url-pattern>
> > </servlet-mapping>
> >
> > to
> >
> > <url-pattern>/testServlet/*</url-pattern>
> >
> >
> > and I can't get it to work, keep getting 404 error.
> >
> > I don't want to default route to the app for all URIs in the url mapping,
> just
> > ones that start with /testServlet
> >
> > Appreciate any help.
> >
> > Ted
> >
> >
> >
> >
>