RE: Re: How to allow Query Strings in REST URI - Spring Restlet

2011-06-15 Thread gonzajg
In your route I see that you included this:

entry key=/users/{id}/resource2?{query} 

Try without declaring query like this:

entry key=/users/{id}/resource2 

I think there's no need to declare {query} to get the query from the URL.



aronitin wrote:
 
 Hi,
 
 I did not really get your point You can include your routes without GET
 parameters
 
 What GET parameters you are talking about here? My Server Resource is
 being instantiated by the SpringRouter settings defined in the xml file.
 
 I'm already fetching the query params as described below.
 
 String view = getQuery().getFirstValue(view);
 
 But the real problem is 404 is being thrown before the server resource is
 instantiated. Routers are not able to identify the incoming request
 http://xyz:8080/resource2?view=filtered and hence throwing 404.
 
 Nitin
 
 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2765509
 


--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/How-to-allow-Query-Strings-in-REST-URI-Spring-Restlet-tp6474960p6478585.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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


RE: Re: How to allow Query Strings in REST URI - Spring Restlet

2011-06-15 Thread Nitin Arora
Hi,

I tried it and it worked. I did not think about that :-(, I was too much into 
the code.

Thanks for the tip

~Nitin

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


Re: Re: How to allow Query Strings in REST URI - Spring Restlet

2011-06-15 Thread gonzajg
I'm glad it worked for you :)

On Wed, Jun 15, 2011 at 3:38 PM, aronitin [via Restlet Discuss] 
ml-node+6480085-1989291684-197...@n2.nabble.com wrote:

 Hi,

 I tried it and it worked. I did not think about that :-(, I was too much
 into the code.

 Thanks for the tip

 ~Nitin

 --

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


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://restlet-discuss.1400322.n2.nabble.com/How-to-allow-Query-Strings-in-REST-URI-Spring-Restlet-tp6474960p6480085.html
  To unsubscribe from How to allow Query Strings in REST URI - Spring 
 Restlet, click 
 herehttp://restlet-discuss.1400322.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=6474960code=Z29uemFAaXN0b2NrbWFuYWdlci5jb218NjQ3NDk2MHwtMzc3OTU5MzY0.




--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/How-to-allow-Query-Strings-in-REST-URI-Spring-Restlet-tp6474960p6480246.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

RE: Re: How to allow Query Strings in REST URI - Spring Restlet

2011-06-14 Thread Nitin Arora
Hi,

I did not really get your point You can include your routes without GET 
parameters

What GET parameters you are talking about here? My Server Resource is being 
instantiated by the SpringRouter settings defined in the xml file.

I'm already fetching the query params as described below.

String view = getQuery().getFirstValue(view);

But the real problem is 404 is being thrown before the server resource is 
instantiated. Routers are not able to identify the incoming request 
http://xyz:8080/resource2?view=filtered and hence throwing 404.

Nitin

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