wood burning stoves 2.0*
The moose likes Web Services and the fly likes How URI get mapped to resources Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How URI get mapped to resources" Watch "How URI get mapped to resources" New topic
Author

How URI get mapped to resources

Rupali Patwa
Greenhorn

Joined: Jun 04, 2012
Posts: 4
Hi,

I am unable to understand URI maps to resources. and resources are things or domain objects.Because whenever we write rest ful application most of the URIs get mapped to java methods

Suppose I have class Employee

Since client can not directly access domain objects we expose some service to let clients manipulate object of employee class

i.e I may not write

@Path("/emp")
public class Employee{
}

@Path("/employee")
public class EmplyeeService{
@GET
@Path("/{"id"}
public Emplyee getEmployee(@PathParam("id" int id){
............
}

}

So my most of the URIs get mapped to java methods and very few one to domain objects
Can somebody explain this


thanks
Rupali
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How URI get mapped to resources