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
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 :)
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
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
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
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
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);
hello!
I run a restlet application inside a j2ee container.
in my web xml are the following entries:
servlet-mapping
servlet-nameRestletServlet/servlet-name
url-pattern/restlet/*/url-pattern
/servlet-mapping
and
welcome-file-list
welcome-fileindex.html/welcome-file
/welcome-file-list
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:
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);
mapping question
Apologies for starting a new post on an existing thread but
everytime I try and follow up I get a top posting error.
Here is the thread on the issue
Rhett,
Thanks for the reply.
I tried mapping to something specific and it still does not
work, 404 error.
I set
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
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
Hi Stephan,
Thanks for the reply.
I tried it with /testServlet/testServlet/ and that did not work.
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
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
15 matches
Mail list logo