MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to General Development
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ynaeht
Post subject: taking more than id  PostPosted: Apr 21, 2011 - 04:43 PM
Registered Member
Registered Member


Joined: Apr 19, 2011
Posts: 4

I am following the tutorial and would like for the GET to filter on "id" and "name".
Is the below code correct? And what should the url be to make that request?

http://localhost:8080/restdemo/services/customers?id=0&Name="xx"

@GET
@Path("{id}")
public Customer getCustomer(@PathParam("id") int cId,
@PathParam("name") String cName) {
return customerMap.get(cId);
}
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject: RE: taking more than id  PostPosted: Apr 26, 2011 - 10:25 AM



Joined: Nov 11, 2010
Posts: 2499

ynaeht,

The code is right.

The URL should be in this format :
http://localhost:8080/restdemo/services/customers/1?name="xx"

Hope this helps.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits