List « jersey « Java Enterprise Q&A

1. Pass List to RESTful webservice

Is there a way to pass a list to RESTFul web service method in Jersey? Something like @PathParam("list") List list?

2. Sending a application/x-www-form-urlencoded list on html

I need to send an HTTP Post request to a RESTful service written in Java and uses Jersey. My java function that handles request is like that:

public Response update(@FormParam("items") List<String> items) {


3. Having problems getting a List of Objects back from Restful service

Hey guys. I've developed some services in REST that are running on Glassfish 3.1. I have a Java SE application and I am using Jersey as the client api.

 public <T> ...

4. Jackson is not deserialising a generic list that it has serialised

When using Apache Jersey with Jackson for JSON serialisation (on both server and client), I'm hitting a problem when deserialising a generic List. The JSON I am producing is as follows, all ...

5. Jackson + Jersey returns List with root name "List"

Im currently trying to create a system for serializing POJO objects using Jackson and Jersey, here my resource:

public class OrganicasFuncaoResource {
public OrganicasFuncaoResource() {
    // TODO Auto-generated constructor stub


public ...

6. Unsupported Media Type (415)- PUTting a java List

I'm getting Unsupported Media Type while HTTP putting a list. My code as follows:


Client postClient = getClient();
WebResource postWebResource = postClient.resource(DEV_URI+"caches1");
Builder requestBuilder = postWebResource.type(MediaType.APPLICATION_JSON);  
requestBuilder.header("accessor", "1011181517"); 
List<MyEntity> list = new ArrayList<MyEntity>();
MyEntity ...

7. How do I generate a list of what resources are available in HTML in Jersey?

I would like for my web service to provide a handy reference to all available end points from each resource root that is requested with a html content type. It seems ...

8. Fetching REST resource as List with Jersey

I'm trying to write a generic function in Jersey which can be used to fetch a List of objects of the same type through REST. I based it on the informations ...

9. jersey list of json objects

I am trying to retrieve in my Jersey implementation resource class post collection of objects like this:

@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String sendEmails(ArrayList<AnyEmail> email) {

10. How to make Jersey/Jackson serialize empty list; single element list as an array

Using Jersey and Jackson to create a REST interface, how do I get List fields to be serialized as a list when there are 0 or 1 elements in them. For ...