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



Reply via email to