Questions tagged [jersey]

Jersey is the open source, production quality, JAX-RS (JSR 311, JSR 339) Reference Implementation for building RESTful Web services.

Jersey is an open source framework for developing RESTful web services in Java and the production-ready reference implementation for JAX-RS 1.1 (JSR-311) and JAX-RS 2.0 (JSR-339). It is included in GlassFish open source application server and WebLogic application server from Oracle, and can be used with other web servers including the lightweight HTTP server included in JDK.

10403 questions
4
votes
1 answer

Upgrading jax-rs shared library on weblogic

Normally weblogic 12c doesnt support jax-rs 2.0 but by the help of jax-rs shared library which comes with weblogic itself it is possible to upgrade jax-rs version from 1.1 to 2.0. The problem is library implementation is jersey 2.5 which doesnt…
jit
  • 452
  • 1
  • 7
  • 26
4
votes
2 answers

What does jersey service return if @Produces annotation missing?

I was begun learn jersey for development restful web services. As I noticed in most of the examples uses following annotations: @Consumes defines format of input parameters @Produces defines format of output parameters But in real code I see…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
4
votes
3 answers

Jersey 2 client with maven

I want to create simple Jersey 2 Client app with Maven (Server app is also implemented and runs). My pom.xml
jiri463
  • 859
  • 1
  • 8
  • 21
4
votes
3 answers

retrieve JsonObject in POST with jersey

I have some problems in my application, I send a POST request, but I cannot retrieve the JsonObject in my server, this is the code to send: String quo = "{\"network\": {\"label\": \"new net 111\",\"cidr\": \"10.20.105.0/24\"}}"; GsonBuilder builder…
rok
  • 2,574
  • 3
  • 23
  • 44
4
votes
1 answer

Jersey client API vs Jersey test framework

I am new to web services and would like to know what is the difference between Jersey client API and jersey test framework? I would like to test my jersey REST web-services end points. Which is the the right one to use?
user1247412
  • 647
  • 7
  • 16
  • 29
4
votes
1 answer

How to handle Service unavailable scenarios with Jersey REST

I have a jersey RESTful service integraed with Spring.The base url mapped in web.xml is /rest/* My service class is below: @Resource @Scope("request") @Path("/service/") @Component public class ServiceController { @GET …
Tom Sebastian
  • 3,373
  • 5
  • 29
  • 54
4
votes
0 answers

Jersey throws mapMappableContainerException,when i deployed on server ,it's working fine with local machine

I have written a rest web services using jersey 1.9.1 and it works perfectly from my local machine but when i deployed it on server it gives me below error Nov 06, 2014 9:34:49 AM com.sun.jersey.spi.container.ContainerResponse mapMappab …
Anupam Sharnagat
  • 61
  • 1
  • 2
  • 5
4
votes
2 answers

Accept comma separated value in REST Webservice

I am trying to receive a list of String as comma separated value in the REST URI ( sample : http://localhost:8080/com.vogella.jersey.first/rest/todo/test/1/abc,test , where abc and test are the comma separated values passed in). Currently I am…
coder
  • 400
  • 1
  • 7
  • 19
4
votes
2 answers

How to register a static class in Jersey?

I have a class of which only static methods are to be accessed via @path annotations and which does not have a public constructor. My simpilified program is: @Path("") static class MyStaticClass { private MyStaticClass() {...} @Get @Path("time") …
Konrad Höffner
  • 11,100
  • 16
  • 60
  • 118
4
votes
1 answer

@Inject CDI not working with JAX-RS

I'm trying to create a simple REST service with JAX-RS (Jersey), without using Spring. I want to have the typical structure of: Resource, that use a Service (typical interface with method findById, findAll...), and that Service injected in the…
edwise
  • 869
  • 2
  • 9
  • 18
4
votes
2 answers

Jersey JSON serialization

I set up an eclipse WebApp project and placed Jersey and Jackson JARs in the WEB-INF/lib directory. I want to use JSON serialization but didn't manage to fix this error: MessageBodyWriter not found for media type=application/json, type=class…
KGolbang
  • 445
  • 1
  • 5
  • 15
4
votes
1 answer

How to get path parameters and matrix parameters from the following uri string? Uri is /flights/flightid;numberofseats=2/date

Am trying to separate the path param and matrix param from the following uri string in jersey. /flights/flightid;numberofseats=2/date. Things I wanna separate following parameters using jersey Flightid numberofseats date I tried all this code to…
susanoo chidori
  • 206
  • 6
  • 19
4
votes
1 answer

can rest framework like jersey be used in clojure instead of compojure

iam newbie to clojure, just curious as to can i use jersey REST api as REST webframework for clojure? all along i see people talking about compojure? if you can provide me any resource or reasoning that would be great Thank you
foop1
  • 41
  • 2
4
votes
1 answer

Hide JSON fields in Jersey RESTful

The thing is that I want to hide the null elements from a RESTFul JSON response (if it's possible). The REST controller retrieves the information from a Mongo database and because this elements doesn't exist there I would like to ignore them when…
ginxo
  • 91
  • 6
4
votes
1 answer

Jackson JSON XML - different names when serializing to XML

I'd like to have different name for my element when it's serialized to XML (for example "fooXml") and different for JSON (for example "fooJson"). Is it possible? I'm using XML annotations like: @XmlElements({ @XmlElement(type = Foo.class, name =…
Greg Witczak
  • 1,634
  • 4
  • 27
  • 56
1 2 3
99
100