1.

How Can You Obtain The Value Of A Method Parameter In Restful Resource Method?

Answer»

@PathParam can be used on method PARAMETER of a RESOURCE method to OBTAIN the value for a method parameter. 

e.g. 

@GET 
@Produces("text/plain") 
public String getWelcomeMsg(@PathParam("username") String userName) { 
... 

@PathParam can be used on method parameter of a resource method to obtain the value for a method parameter. 

e.g. 

@GET 
@Produces("text/plain") 
public String getWelcomeMsg(@PathParam("username") String userName) { 
... 



Discussion

No Comment Found