Questions tagged [jersey-1.0]

Jersey 1.0 is the open source, production quality, JAX-RS 1.1 (JSR 311) reference implementation for building RESTful Web services. Only use this tag if your question specifically pertains to Jersey 1.0.

Jersey 1.0 is the open source, production quality, JAX-RS 1.1 (JSR-311) reference implementation for building RESTful Web services. Jersey provides an API so that developers may extend Jersey to suit their needs. The governance policy is the same as the one used in the GlassFish project.

204 questions
3
votes
0 answers

Jersey 1 ContainerResponseFilter

I have a Jersey 1 ContainerResponseFilter in a shared library, which I register in Jersey 1 web services by specifying the package this filter exists in inside the web.xml eg. ServletAdaptor
PDStat
  • 5,513
  • 10
  • 51
  • 86
3
votes
1 answer

What is the entry point Servlet of Jersey API?

Spring MVC/Rest has DispatcherServlet as an entry point. What is the Jersey's entry point ? I am asking because some exception is thrown and I don't know where from.
Adelin
  • 18,144
  • 26
  • 115
  • 175
3
votes
0 answers

Tomcat Jersey REST - Spaces in @PathParam

Should spaces be possible in @PathParams when creating REST-Services via Jersey 1.19 in Tomcat 2.0.27? Jersey returns 400 Bad Request whenever I try to call my REST-Service with a space in the filename path param. It does not even reach my code. If…
annih
  • 395
  • 2
  • 6
  • 21
3
votes
1 answer

Migration of JSONJAXBContext jersey 1.x to 2.x

I want to upgrade my jersey version to 2.x from 1.x. In my code I had: @Provider @Produces(MediaType.APPLICATION_JSON) public class JAXBContextResolver implements ContextResolver { private static final Class[] classes = { …
Shiran Maor
  • 309
  • 2
  • 5
  • 18
3
votes
1 answer

Maven dependency for testing using Jersey Test Framework

I am trying to test a Restful service using Jersey Test Framework , I have the following code in place. import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; import java.net.URLEncoder; import…
user1965449
  • 2,849
  • 6
  • 34
  • 51
3
votes
1 answer

@context httpServletRequest request for post method in jersey is null

I am getting multipart msg from android client. I am using jersey webservice to receive that multipart data. I can able to retrieve multipart data. but I can't able to use @Context HttpServletRequest request to get user id. My android client…
mmathan
  • 273
  • 1
  • 5
  • 13
3
votes
2 answers

spring boot application configuration for JaxRs based Swagger

Is there an example available to configure spring boot+Jersey+JaxRs application for Swagger? Referring to this post, I have below code in my app and am not able to bring up the swagger UI and neither able to list the resources using…
suman j
  • 6,710
  • 11
  • 58
  • 109
3
votes
1 answer

Using Single Jersey REST class for multiple PATH

I have started developing REST services using JAX-RS. Using Jersey is pretty straightforward however one difference which I come across using Spring MVC and Jersey REST classes is, Spring supports having to ignore the Root Path element and have…
Yogendra
  • 331
  • 5
  • 21
3
votes
0 answers

How can a Jersey InjectableProvider depend on the AbstractMethod of the resource?

I have a ResourceFilterFactory that returns a ContainerRequestFilter if an annotation is present on the AbstractMethod. The filter reads a cookie or API key and checks that it is still valid, and sets a property on the request. The check is…
also
  • 974
  • 7
  • 21
3
votes
1 answer

Why does Jersey say "Array of packages must not be null or empty" when I create my own PackagesResourceConfig?

I created my own PackagesResourceConfig that looks like this: import com.sun.jersey.api.core.PackagesResourceConfig; import javax.ws.rs.core.MediaType; import java.util.HashMap; import java.util.Map; public class ResourceConfigClass extends…
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
3
votes
2 answers

Jersey: Is there a clean way to specify allowed URL extensions?

I'm using Jersey 1.17.1 and on every URL I've created I want to allow people to put ".json" at the end or not. Here's an example of what I've done: @GET @Path("basepath{extension: (\\.json)?}") public String foobar() { ... } Eventually I'm…
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
3
votes
3 answers

In Jersey, how do you deal with @POST parameters of a deeply nested, complex object?

I'm using Jersey 1.x here and I have a @POST method that requires sending over a deeply nested, complex object. I'm not sure of all my options, but it seems like a lot are described in this documentation: In general the Java type of the method…
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
2
votes
1 answer

Can Jersey Client be used in multithreaded environment for consuming rest api?

I want to create a Jersey Client for a multithreaded project. Do i need to create a connection pool for the Client ? There is 500 TPS traffic on the server .How to calculate the below parameters for best…
Codemaster
  • 145
  • 2
  • 13
2
votes
0 answers

Error 404 when trying to access {API}/swagger.json - jersey 1.x swagger-core 1.5.8

I am trying to integrate swagger (version 1.5.8) into an existing REST API that uses jersey 1.19. I followed the documentation for implementing swagger in a jersey 1.x app but no matter what I try, the endpoint (localhost:8080/swagger.json) always…
2
votes
0 answers

Jersey filter starting exception while using forEach

Method definition: @POST @Path("/run") @Produces({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON }) public String runSomething(CustomInputModel customInputModel) { // With simple loop for (String machine :…
1 2
3
13 14