Hi Troy,
This is weird... Could you send us code snippet reproducing the issue?
I would suggest to try "new Reference("**your URI**").getQuery()" first to
check that the query extraction does work in your case.
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~
http://www.restlet.orgNoelios Technologies ~ Co-founder ~
http://www.noelios.com-----Message d'origine-----
De : troy [mailto:
[hidden email]]
Envoyé : mercredi 4 novembre 2009 22:01
À :
[hidden email]
Objet : problem getting query portion
Using 2.0-M3, I have problems getting the query portion of a URL from
my ServerResource
org.restlet.data.Form form = getQuery();
System.err.println("QUERY " + form.getFirstValue("foo"));
System.err.println("ROOT " + getRootRef());
System.err.println("ROUTED " + getReference().getBaseRef());
System.err.println("REMAINING " +
getReference().getRemainingPart());
System.err.println("QUERY " + getReference().getQuery());
System.err.println("QUERY " +
getReference().getQuery(true));
System.err.println("QUERY " +
getReference().getQueryAsForm())
gives
[java] QUERY null
[java] ROOT
http://localhost:8182/control [java] ROUTED
http://localhost:8182/control/doc/voyeur/account [java] REMAINING &foo=barrrrrrrrrrrrrrrrrrrrrr
[java] QUERY null
[java] QUERY null
[java] QUERY []
Only getReference().getRemainingPart() shows my query portion.
getQuery returns null, getQueryAsForm returns an empty form.
Is this right? Have I missed something?
This is with
router.attach("/doc/{login}/account",
AccountResource.class);
Thanks,
-troy
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2414519
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2416472