Resource « jersey « Java Enterprise Q&A





1. RESTful resource not found. 404 or 204? Jersey returns 204 on null being returned from handler    stackoverflow.com

If you are looking for /Resource/Id and that resource does not exist, I had always though that 404 was the appropriate response. However, when returning "null" from a Jersey handler, I ...

2. Jersey Resource class interaction?    stackoverflow.com

So, I'm coming up to speed on Jersey and have a "best practice" question. How strict should keep the resources self contained in one file. Should one resource class reference another ...

3. jersey: composite resource    stackoverflow.com

How can I have a resource that is a composite so that a GET to it returns a list of GET to all its subresources so that they can accept a ...

4. What should I be doing to serialize/marshal (and vice-versa) resources that refer to other resources?    stackoverflow.com

I have a SpringServlet (from Jersey) that is exposing my JPA-annotated POJOs in a very basic manner right now. For example, rather than returning an actual represetantion of the object, I've ...

5. Working with root resources that inter relate    stackoverflow.com

Foo and Bar are both Beans. If FooResource is accessed via /foo/{id} and BarResource by /bar/{id} and Foo relates to Bar, should I return the URI for Bar or just the id ...

6. The ResourceConfig instance does not contain any root resource classes    stackoverflow.com

Whats going wrong here ? The ResourceConfig instance does not contain any root resource classes. Dec 10, 2010 10:21:24 AM com.sun.jersey.spi.spring.container.servlet.SpringServlet initiate SEVERE: Exception occurred when intialization com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does ...

7. Can't get Jersey JAX-RS Resource working with Proguard-obfuscated REST service    stackoverflow.com

Please excuse the length of this posting. I am trying to get all of the useful information in it and anticipate questions people might have. I have a series of RESTful web ...

8. Easy REST resource versioning in JAX-RS based implementations?    stackoverflow.com

Best practice for REST resource versioning is putting version information into Accept/Content-Type headers of HTTP request leaving URI intact. Here is the sample request/response to REST API for retrieving system information:

==>
GET /api/system-info ...

9. Jersey Resource Filters    stackoverflow.com

Jersey allows resource filters applied to resource classes, resource methods, sub-resource methods or sub-resource locators. When applied to a sub-resource locator: is the response filter applied before or after the ...





10. How to define my resource class?    stackoverflow.com

I am newbie in RESTful Jersey. If I have a car resource:

@Path("/car")
public class CarResource {
    @GET
    @Produces({MediaType.APPLICATION_JSON})
    public Car getCar(@QueryParam("id") String id) ...

11. Jersey REST The ResourceConfig instance does not contain any root resource classes    stackoverflow.com

Although this is one ancient question, I still can not find the answer to make this work. Please correct if you find any of my statement is not correct. I have a Java ...

12. New to Jersey -- Getting Unsupported Media Type at Resource    stackoverflow.com

I'm new to Jersey and REST so please pardon if my question is too stupid. I have a simple resource called Places, and it should support a GET operation which returns ...

13. JAX-RS and Jersey - only one resource of multiple exposed    stackoverflow.com

I've got the start of a RESTful web service using JAX-RS and Jersey that exposes two resources: SessionResource and ItemResource. Only one of these, unfortunately, is exposed by the web ...

14. @Singleton or getSingletons() while implementing Singleton Resources in Jersey    stackoverflow.com

I have a resource to be exposed as Restful WS.If I have to make it Singleton, what is the preferred and advised way: 1 . Annotating the resource class using @Singleton Or 2 ...

15. JAX-RS Jersey/Grizzly Define an interface resource    stackoverflow.com

Following the example here On deploying a sample resource using the Grizzly container. It uses a resource that is defined as a class, instead I would like to define an ...

16. How to wire in a collaborator into a Jersey resource?    stackoverflow.com

I have a method to start up my application:

public void start() throws IOException {
    final Map<String, String> initParams = new HashMap<String, String>();
    initParams.put("com.sun.jersey.config.property.packages", "com.example");
  ...





17. Define WADL resources base in Jersey    stackoverflow.com

I am using Jersey 1.9 and it is generating my WADL perfectly except I need to redefine the resources base URI. I'm running Jetty 7 sitting behind Apache using mod_proxy as a ...

18. Jersey and ResourceConfig doesn't find resource classes    stackoverflow.com

I'm using jersey into a grizzly web container. When I run the software on windows it works fine. When i deploy the jar into a linux machine, the resourceconfig dosn't find ...

19. jersey calling one resource from another to resuse code    stackoverflow.com

I am trying to refactor my code to make re-use existing code but wanted some suggestions as to how this should be done in the best possible way using REST resources ...

20. How can I get resource annotations in a Jersey ContainerResponseFilter    stackoverflow.com

Jersey offers two classes to interact with annotations on resources:

21. How to code java jersey REST API with multi-leveled resources?    stackoverflow.com

I want to code a REST API that is multileveled like:

/country
/country/state/
/country/state/{Virginia}
/country/state/Virginia/city
/country/state/Virginia/city/Richmond
I have a single java class that is a Country resource with @Path("country") How do I create a StateResource.java and CityResource.java so ...