RE: Default Routes

2009-02-06 Thread blackhole
So it turns out WebLogic is adding index.jsp to my URIs, which of course 
routes to the /{year} Resource instead of default /.  Thanks for the help!  
Now just have to figure out how to make WebLogic behave :)

 did you check that requets to / are without parameters. If it's a 
 webservice and you use a browser, it can add some default paremeter, which 
 makes router to go to Special Resource.
 I had a similar problem. check your log.
 
 Regards,
 Ruben
 
 
 
 
 postmas...@tigris.org 
 28/01/2009 22:52
 Por favor, responda a
 discuss discuss@restlet.tigris.org
 
 
 Para
 discuss@restlet.tigris.org
 cc
 
 Asunto
 RE: Default Routes
 
 
 
 
 
 
 Sorry, had a typo in my original post.  I tried:
 
 router.attach(/, DefaultResource.class);
 router.attach(/{year}, SpecialResource.class);
 
 And all requests to / still go to the special resource.  This seems like 
 a pretty standard configuration so I'm not sure why it's behaving this 
 way.  Surely people use / all the time without problems, so am I 
 forgetting to set something else?  Here's my entire code for createRoot():
 
 Router router = new Router(getContext());
 router.attach(/, DefaultResource.class);
 router.attach(/{year}, SpecialResource.class);
 return router;
 
 Straight from the tutorial really.  Ive also tried setting the 
 defaultMatchingMode to BEST, FIRST, and LAST, and all have the same 
 behavior.
 
 As for your suggestion with making param match alpha_num, is there a way 
 to do this with restlets or would I just supply a regex?  In the latter 
 case, how would the resource get the parameter since it's not named?
 
 Thanks,
 
 Mike
 
 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1064629

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1108985


RE: Default Routes

2009-01-28 Thread Ruben Hernando
did you check that requets to / are without parameters. If it's a 
webservice and you use a browser, it can add some default paremeter, which 
makes router to go to Special Resource.
I had a similar problem. check your log.

Regards,
Ruben




postmas...@tigris.org 
28/01/2009 22:52
Por favor, responda a
discuss discuss@restlet.tigris.org


Para
discuss@restlet.tigris.org
cc

Asunto
RE: Default Routes






Sorry, had a typo in my original post.  I tried:

router.attach(/, DefaultResource.class);
router.attach(/{year}, SpecialResource.class);

And all requests to / still go to the special resource.  This seems like 
a pretty standard configuration so I'm not sure why it's behaving this 
way.  Surely people use / all the time without problems, so am I 
forgetting to set something else?  Here's my entire code for createRoot():

Router router = new Router(getContext());
router.attach(/, DefaultResource.class);
router.attach(/{year}, SpecialResource.class);
return router;

Straight from the tutorial really.  Ive also tried setting the 
defaultMatchingMode to BEST, FIRST, and LAST, and all have the same 
behavior.

As for your suggestion with making param match alpha_num, is there a way 
to do this with restlets or would I just supply a regex?  In the latter 
case, how would the resource get the parameter since it's not named?

Thanks,

Mike

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1064629

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1067351