Top "Jax-rs" questions

JAX-RS: Java API for RESTful Web Services.

JAX-RS — How to return JSON and HTTP status code together?

I'm writing a REST web app (NetBeans 6.9, JAX-RS, TopLink Essentials) and trying to return JSON and HTTP status code. I …

java rest jax-rs http-status-codes
Can not deserialize instance of java.util.ArrayList out of START_OBJECT token

I'm trying to POST a List of custom objects. My JSON in request body is this: { "collection": [ { "name": "Test order1", "…

java spring jackson jax-rs resteasy
When to use @QueryParam vs @PathParam

I am not asking the question that is already asked here: What is the difference between @PathParam and @QueryParam This …

java rest jax-rs
Best practice for REST token-based authentication with JAX-RS and Jersey

I'm looking for a way to enable token-based authentication in Jersey. I am trying not to use any particular framework. …

java rest authentication jax-rs jersey-2.0
How to access parameters in a RESTful POST method

My POST method looks like this: @POST @Consumes({"application/json"}) @Path("create/") public void create(String param1, String param2){ System.…

java web-services rest jersey jax-rs
Java 8 LocalDate Jackson format

For java.util.Date when I do @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd/MM/yyyy") private Date dateOfBirth; then …

java json jackson jax-rs resteasy
REST response code for invalid data

What response code should be passed to client in case of following scenarios? Invalid data passed while user registration like …

http rest jax-rs
JAX-RS / Jersey how to customize error handling?

I'm learning JAX-RS (aka, JSR-311) using Jersey. I've successfuly created a Root Resource and am playing around with parameters: @Path("/…

java rest error-handling jersey jax-rs
javax.xml.bind.JAXBException: Class *** nor any of its super class is known to this context

I'm trying to pass a object via REST web service. Following are my classes explains the functionality that I need …

java rest jaxb jax-rs
How to POST a JSON object to a JAX-RS service

I am using the Jersey implementation of JAX-RS. I would like to POST a JSON object to this service but …

json jersey jax-rs