map « jersey « Java Enterprise Q&A





1. Java library to map request parameters onto an object    stackoverflow.com

I have used stipes on a project in the past, and it has a great TypeConverter library that can take request parameters and route them into JavaBeans. It can even ...

2. Mapping methods in Jersey framework    stackoverflow.com

Is it possible to map methods to methods calls to URL path both with ID and with parameters? For instance: http://localhost/ws/updateUser/32332?name=John?psw=123 public void updateUser(Sting name, String psw){..} It seems that current @PathParam annotation supports ...

3. How can I map semicolon-separated PathParams in Jersey?    stackoverflow.com

Is there a way to use this parameter style:

/products/123;456;789
in JAX-RS with Jersey? If I use PathParam, only the first parameter in the list is returned. I tried to escape ...

4. How do you map multiple query parameters to the fields of a bean on Jersey GET request?    stackoverflow.com

A service class has a @GET operation that accepts multiple parameters. These parameters are passed in as query parameters to the @GET service call.

@GET
@Path("find")
@Produces(MediaType.APPLICATION_XML)
public FindResponse find(@QueryParam("prop1") String prop1, 
  ...

5. How to map a path suffix to a query parameter using Java Jersey?    stackoverflow.com

Background: we have build a RESTful API using Jersey a while ago where we map the uri /items.json to a json array of ids and /items/{id}.json to the json object of ...

6. Customising Jersey JSON marshalling for java.util.Maps    stackoverflow.com

By default, marshalling a @XmlRootElement bean containing a map gives the structure:

myMap : {
    entry : {
        key : {
  ...

7. Jersey JSONConfiguration FEATURE_POJO_MAPPING - how to skip unwanted entries during deserialization    stackoverflow.com

I'm defining pojos for facebook objects, which can be consumed by clients who dont have the capacity to parse JSON. Some of the FB object's data structure is loosely defined, like ...

8. Separate Exception mapping for REST web service / Web UI service    stackoverflow.com

I have written a web service with Jersey. This web service provides both REST methods to be accessed via a REST client, and a User WebUI (basically simple HTML). Those two aspects are ...

9. JAX-RS and Jersey: SEVERE: Mapped exception to response: 501    stackoverflow.com

We've got a JAX-RS resource method that handles GET requests for our resource. That GET method is currently unimplemented and we'd like to return a response code that says so. We ...





10. Jersey Getting a HTTP 405, path mapping not handled as expected    stackoverflow.com

I have the following 2 methods...

@GET
@Path("/{solution}")
public Response test(@PathParam("solution") String solution,
        @Context UriInfo uriInfo, @Context HttpHeaders headers);

@GET
@Path("/{solution}/{path:[a-z0-9/\\-]*}")
public Response testTest(@PathParam("solution") String solution,
     ...

11. Jersey (REST) throw exception and map to HTTP error or return custom error code?    stackoverflow.com

Basically I written a REST service and my business logic requires me to validate the input. For instance make sure the format of phone number is (###)###-####. If it is not, ...