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
2
votes
1 answer

java.lang.IllegalArgumentException: Duplicate handler name: decoder in netty http server

I'm trying to create a netty-jersey http application and the code is in github branch duplicate-handler here. The code compiles and runs fine when I run the main program NettyJerseyDemoApp. When I invoke this application using any http request curl…
user51
  • 8,843
  • 21
  • 79
  • 158
2
votes
0 answers

Java Webservice: GET returned a response status of 401 Unauthorized

I got an Webapplication including a webservice. The app is running on a tomcat where an SSL certificate is installed. The application and the webservice is running. If I try to use the webservice through the browser by…
Ronaldo-CH
  • 117
  • 1
  • 13
2
votes
0 answers

Migrating from jersey 1.19 + spring 5 to Jersey 2.25 + spring 5

I'm trying to migrate a application I have in Jersey 1.19, jersey-spring and Spring 5.0.5 to using Jersey 2.25, jersey-spring3 and Spring 5.0.5 but I'm running into trouble. I've changed the maven dependencies to use the new Jersey version, I run…
Dieguinho
  • 758
  • 2
  • 14
  • 31
2
votes
1 answer

How to register a provider in Jersey 1.x via ResourceConfig?

As com.sun.jersey.api.core.ResourceConfig doesn't contain 'register' method. I want to register ContainerResponseFilter programmatically. I also tried to register it via @Provider annotation: @Provider public class MyFilter implements…
YerivanLazerev
  • 353
  • 3
  • 17
2
votes
0 answers

Authentication Filters in Jersey 1.x

Is there an alternative to @NameBinding annotation in Jersey 1.x I have developed a REST based Server API using Jersey 1.x but, need to implement Filters only for certain Requests. On researching found that, @NameBinding performs the job perfectly.…
sneha
  • 21
  • 2
2
votes
1 answer

Jersey Rest API Documentation using Swagger

I am trying to view the list of my jersey rest service methods in API Documentation using Swagger. Went through few examples/sample given in GitHub sites. But still I am not able to list out my service methods when I try to access the context-root…
Tameem510
  • 23
  • 1
  • 4
2
votes
1 answer

Jersey omits XmlTransient annotation during serialization

There was a requirment formating java.util.Date into string rather than timestamp in json. { "partyName": "Lifecare Pharmaceuticals", "partyShortName": null, "lastUpdateDate": 1486639814590, // replace with dd-mm-yyyy hh:mm:ss } To…
vels4j
  • 11,208
  • 5
  • 38
  • 63
2
votes
1 answer

Jersey 1.13 web service on Weblogic 12.2.1.x

I am trying to get a very simple Jersey web service to run on Weblogic 12.2.1.x but I am failing miserably In my web.xml I have the following
PDStat
  • 5,513
  • 10
  • 51
  • 86
2
votes
1 answer

Jersey PreMatching Filter : Adding parameters to modified URI

I have a rest api. Eg : http://localhost:8080/api/user/view?name=user&lastname=demo I want to modify my URI to maintain version. I want to add '/v1/' between '/user/view' So that my URI will look like as follows…
Shivkumar Mallesappa
  • 2,875
  • 7
  • 41
  • 68
2
votes
1 answer

CSRF Protection with Custom header other than X-Requested-By

This is related to the post https://security.stackexchange.com/questions/23371/csrf-protection-with-custom-headers-and-without-validating-token/23373#23373?newreg=9acf3e40d05f4d19a00eb58b160f8453 So if we have decided to use Custom Header Validation…
victor
  • 153
  • 2
  • 14
2
votes
0 answers

Access Control Allow Origin Error in jersey web service

I need to enable CORS (Cross Origin Resourcing) on my App, I am using jersey in Webservice. Setting the Access control origin in response header isn't helping. headers.put("Access-Control-Allow-Origin",…
zillani
  • 1,070
  • 3
  • 18
  • 26
2
votes
0 answers

JSON Response Object has additional name/value pair

I am using a REST Post service (using Jersey 1.19) to create a new session details. This is my code: @POST @Path("/createSession") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response createSession(String json)…
Ali Bhagat
  • 475
  • 1
  • 6
  • 15
2
votes
2 answers

Jersey resource that matches any path

I am using Jersey v1.x and a Guice Servlet. What I'm trying to do is bind a Jersey Resource that matches any @Path, such that I can use Jersey to respond with a 404. I'm looking to do this, since my servlet consists of different components (e.g. a…
derabbink
  • 2,419
  • 1
  • 22
  • 47
2
votes
1 answer

File Vs Inpustream in jersey 1.x jaxrs resource

Have a need to provide file upload feature using Jax-Rs Jersey-1.x resource. I want to know if its better to create the method with "File" as parameter or "InputStream"? Resource will accept application/octet-stream content-type and not tied to…
suman j
  • 6,710
  • 11
  • 58
  • 109
2
votes
2 answers

Jersery JAXRS resource path validation message for 404

When using regex for @Path fragments, Jersey runtime results in returning 404 for the resources that do not match the regex pattern. Is there a way to customize this behaviour and return 400 (BAD_REQUEST) or add a meaningful message to the…
suman j
  • 6,710
  • 11
  • 58
  • 109