Hello,

I've tried your code and the filter is triggered and has access to the
query parameter in every cases.
Having said that, I notice that the call to http://localhost:8080/?test=test
returns a 404 status because there is no url template that matches the "/"
url.
When defining this template "/{id}" the {id} variable cannot be empty.

Best regards,
Thierry Boileau

2015-02-08 7:49 GMT+01:00 Xybrek <[email protected]>:

> I have this code:
>
> @Override
> public Restlet createInboundRoot() {
>
>      Router router = new Router(getContext());
>
>      Redirector forward = new Redirector(getContext(), SOME_URL,
>              Redirector.MODE_CLIENT_FOUND);
>
>      router.attach("/" + "{id}", forward);
>      router.attach("/rest/", RootServerResource.class);
>
>      MyFilter myFilter = new MyFilter(getContext());
>      myFilter.setNext(router);
>
>      return myFilter;
> }
>
> The problem with this code is that Restlet cannot seem to process query
> parameter on ROOT path:
>
> http://localhost:8080/?test=test
>
> Filter does not trigger.
>
> However, when through the /rest/ part
>
> http://localhost:8080/rest/?test=test
>
> Filter gets triggered.
>
> What could be the problem with this code?
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3097557
>



-- 
*Thierry Boileau, Mr B*
+1 (408) 387-3184 • [email protected]

<http://restlet.com/>
6 Rue Rose Dieng-Kuntz • Nantes, 44300 • France

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

Reply via email to