aspose file tools*
The moose likes Web Services and the fly likes Accessing Query Params in Rest Service using Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Accessing Query Params in Rest Service using Spring" Watch "Accessing Query Params in Rest Service using Spring" New topic
Author

Accessing Query Params in Rest Service using Spring

Ganesh Kumar C V
Greenhorn

Joined: May 12, 2011
Posts: 5
Hi - I am creating a REST service and I need to parse the incoming request which contains variable number of query params. I was using @PathVariable when I defined standard number of arguments in the rest method. Now the service receives all the inputs via query params and I need a way to parse this. Can anyone help me in this?

Thanks
Ganesh
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Would it be possible for you to give actual examples of the scenarios you want to support concerning parameters?
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Ganesh Kumar C V
Greenhorn

Joined: May 12, 2011
Posts: 5
Hi Ivan - I have used @RequestParam to do this. I am just new to spring and rest... I just googled a bit more to find this. Anyways thanks for your reply.

Thanks
Ganesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing Query Params in Rest Service using Spring
 
Similar Threads
Conditional 'where' condition
RESTful client or HTTP client with DOM
How to use Bind Variable with FROM and UPDATE clauses in PreparedStatement???
Jibx parsing
Init-Params and COntext-Params