Most voted "jersey" questions
Jersey is an open source framework that serves to build Restful Web services in Java, implemented according to the JAX-RS specification (JSR 311 and JSR 339).
Learn more…47 questions
Sort by count of
-
5
votes1
answer925
viewsHow to determine which HTML file should be displayed as input in Jersey?
I’m trying to find a way to provide a correct entry page in Jersey. A login page when there is no logged in user, otherwise I should display another homepage that will call Restful services…
-
3
votes1
answer641
viewsTomcat 8, Ajax (jQuery), Jersey, REST API does not work, enable CORS
I have been trying for a while to configure CORS to work with my Tomcat 8. But whenever I have to submit the POST request, I get the error message: "Response to preflight request doesn’t pass access…
-
3
votes1
answer342
viewsFile upload inside webapp folder
I have a Rest API with Jersey where I upload files. If I set the path to anywhere else, ex: C:\\uploads works, but would like to save these files inside a webapp directory: Currently I do so: @POST…
-
2
votes1
answer1114
viewsHow not to serialize some attributes in Restful calls with Jersey and Jackson
I’m using the Jersey library in conjunction with the Jackson library to use REST-like web services. In calls, I usually use the following code that transforms a particular entity into a JSON to be…
-
2
votes2
answers1399
viewsConfigure Hibernate transactions only with Jersey API Annotations
I want to use something similar to org.springframework.transaction.annotation.Transactional Spring that configures a Transaction only using only the Jersey API. Something similar to the code that…
-
2
votes0
answers571
viewsReply XML does not display accented characters
I am using Jersey in a WEB application. In this application, I return an XML file to client requests (which are web-browsers). In order to ensure accented character display, I wrote the Produces…
-
2
votes1
answer2126
viewsAngularjs User Authentication with Java/Jersey Rest API
I am developing the user authentication module in my application and I am having some problems accessing the API, getting error 403. The old way I was doing, when I sent the request to the service,…
-
2
votes1
answer412
viewsHow to set up Jersey 2.22 in the project?
I’m having a hard time setting up Jersey 2.22.1 on my web project that is deployed on the server Tomcat 8, that I’m developing in Netbeans. Note: I use Maven. I have read and reread the…
-
2
votes1
answer271
viewsCreate Rest service versions
I am creating Rest services with Java (Jersey). This service tends to grow and evolve, and may undergo changes in existing routines, therefore, I believe that the best way would be to create…
-
2
votes1
answer593
views -
2
votes1
answer24
viewsYou can create @POST method with Jersey returning a List
Good afternoon! I am developing a Webservice where I need the query method to receive an object as a search parameter and return the list found in the database. I found several tutorials from…
-
1
votes1
answer504
viewsHow to map a http request parameter to an Enum in java?
I’m making an ajax requisition like this: $.ajax({ type : 'POST', url : apiURL + '/play', dataType : "json", data : { against : "ANYBODY" }, success : function(data, textStatus, jqXHR) { // ... },…
-
1
votes1
answer568
viewsJava/eclipse does not recognize Path GET annotation
I am developing a Restful application, using eclipse and jersey (No use framework). But I’m having a problem with @Path annotations, @GET. When I use these annotations there is an error in the line…
-
1
votes0
answers28
viewsJersey API Cache
I’m having second thoughts about Jersey Cache control. Using Queryparam, is there a risk that the browser/server will cache the result? Or this only happens when I work with Pathparam within my GET…
-
1
votes0
answers68
viewsError while retrieving Web Service Object List (CSV)
I have an error retrieving a list of CSV objects from the server.. I’m using Jsefa to serialize and deserialize Java Beans for CSV and implemented a Messagebodywriter and Reader to make this…
-
1
votes0
answers396
viewsJson returns empty (web service with Jersey)
I am developing a web service using Jersey and the Json returned by one of the methods is coming empty. The strange thing is that the other methods are following the same logic and are working…
-
1
votes0
answers69
viewsError when converting java project with Jersey to Maven
I created a project with angular and WS REST using Jersey. It was working normal until I went to convert the project pro Maven. While trying to move up the project, I’m having the following…
-
1
votes1
answer331
viewsImplementation of Containerrequestfilter with Jersey
I’m doing the token implementation through this tutorial, but when I try to implement Containerrequestfilter the program sends the error below. The error occurs only with the implementation of the…
-
1
votes0
answers301
viewsHow do I set the path (URL) of a Java web application correctly so there are no 404 (Not Found) errors when the project is in production?
I have a Java web project in which I use the Jersey framework. When I deploy to my localhost (use Tomcat 9) everything works, when I take it to Heroku the app works too. However, when I request a…
-
1
votes1
answer81
viewsRemove default message @Pattern JPA
I need a help from you. I am creating a web service in java using jersey and Ibernate. To validate the fields informed by who calls the service I used for one of the fields the JPA @Pattern…
-
1
votes0
answers165
viewsMaking a relationship update using REST, Jax-rs, Jersey and Javascript
Well, I took a basis to make a simple CRUD of just one table using REST and the others that I put in the question, everything worked perfectly, until I put more tables(classes) and relationship…
-
1
votes1
answer74
viewsTomcat 9 - application/json was not found
Greetings, I am developing a WS in Jersey/Restful which is working properly in Glassfish but in Tomcat I get the error when trying to consume the service. GRAVE: Mapped Exception to Answer: 500…
-
1
votes1
answer490
viewsSending a file by form, but not by Postman
I made a webservice with Java Jersey to send files, when I try to send files using an HTML form, it works, however, when I try to send from a client or in Postman, an error 500 is returned with…
-
1
votes2
answers117
viewsValues do not serialize in return in REST with Jersey
Good morning, you guys, I’m new here and beginner also with Java and I’m having a problem with the serialization of an object and no longer know what to do. I am giving, at least trying, to maintain…
-
1
votes0
answers16
viewsImageio.read returns null when Inputstream use jersey
I have the following problem I have the following service: @PUT @Path("/validateQRCode") @Logging @Permissions(allAllowed = true) @Consumes(MediaType.MULTIPART_FORM_DATA)…
-
0
votes0
answers366
viewsWebservice Restful Jersey
I am starting the development of Webservice Restful Jersey in Java and I am not able to connect to realize a simple Hello World. I added the jar: asm-3.1jar jersey-core-1.19jar jersey-server-1.19jar…
-
0
votes0
answers420
viewsUpload image + parameters Httpurlconnection
I have a Rest server and I need to upload images and also send parameters. I’ve done a lot of research, but I still can’t get the client to work. By the browser works right, via code I can send the…
-
0
votes0
answers972
viewsGetting HTTP Error 500 Internal Server Error Using Jersey
I’m studying REST. I’m using jersey to create a service RESTful. I came across a problem trying to create a service that would return an object json. I am using a client (java) to request the…
-
0
votes0
answers103
views[jersey-Servlet]: com.sun.jersey.api.container.Containerexception: The Resourceconfig instance does not contain any root Resource classes
I’m trying to get application up in WAS 8.5, but I’m making this mistake when deploying, and with that the application does not run. WEB.XML <servlet>…
-
0
votes1
answer64
viewsWebservice Rest
I’m wondering how do I send one post in format json using a form. That’s the form that I use: <form action="rest/carros" enctype='application/json' accept-charset="utf-8" method="post">…
-
0
votes1
answer23
viewsIs Jersey2 different from Jersey v2.x?
I am trying to implement Swagger in Jersey and there is the implementation for both Jerseys. Want to know if Jersey2 is different from Jersey v2.x? or is the same.
-
0
votes0
answers211
viewsProblem with hibernation and JPA
It’s a WS REST, he should return a donor, but he’s making an exception... Console: set 22, 2016 3:37:15 PM org.hibernate.Version logVersion INFO: HHH000412: Hibernate Core {5.0.1.Final} set 22, 2016…
-
0
votes1
answer63
viewsPut WS in Heroku
Does anyone know how to configure persistence.xml to access a Heroku database? I’m trying with the credentials they pass but gives password error to that user. I wonder if someone could help me with…
-
0
votes1
answer255
viewsUsing Gson instead of Jackson in web service that makes use of Jersey
I found out that Jersey by default makes use of the Jackson framework for resources to return data in Json format. However, I had the need to use the Gson framework to convert objects to Json. How…
-
0
votes1
answer41
viewsWeb service for java desktop
I have a question. How is the request made for a php page using java desktop? Should I create another project for java web?
-
0
votes1
answer95
viewsError while consuming Glassfish + Jersey REST web service with date that returns an xml
I need to consume a web service (WS) REST on my android app. The web service was done with glassfish, jersey and the Hibernate ORM to communicate with the database. Below is the WS code: Vegetarian…
-
0
votes1
answer589
viewsRequest without @Xmlrootelement
I’m doing a simple user registration with Java and Angularjs. My javascript request looks like this: $http({ url: "rest/user/register", method: "POST", data: $scope.newUser }); In java, I have a…
-
0
votes1
answer245
viewsJava RESTFULL using Jersey
Guys, I’m trying to develop a project in Java with a Web Service REST, I’m new in this Web Service business, so I’m kind of lost. I cannot access my service through the browser URL, when I enter the…
-
0
votes1
answer274
viewsHow to integrate CDI-Unit with Jersey Test Framework?
Hello. I am working on a Ws Rest with CDI and Jersey. I want to create a test unit with Junit and due to CDI ended up using the CDI-Unit Runner. I found CDI-Unit simpler than Weldjunit4runner. Now,…
-
0
votes1
answer1112
viewsResponse to preflight request doesn’t pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested Resource
I am running client/server tests where the client is being developed with Angularjs and the java server + Tomcat + jersey. When I try to do a client-side post, it gets to the server at the right…
-
0
votes0
answers290
viewspass several annexes via ajax
Hello guys my first post here, I’m having a problem sending more than one attachment via Ajax. I have an API in jersey that gets the call. if I send only one attachment works well, however if I…
-
0
votes2
answers214
views -
0
votes0
answers216
viewsJava - Generic Type as parameter of the readEntity method of Jax rs client
I want to abstract a post method from my code, using Generic type to facilitate implementation. The code is a Ws client using Jax-rs. The following public T2 post(T1 requisicao, String path){…
-
0
votes1
answer67
viewsJava Jersey HTTP, cannot receive browser parameters
Hello I would like to receive a parameter from the browser and print using webservices with Jersey, however the parameter does not reach my method, it is not to be printed. XML <?xml…
-
0
votes1
answer24
viewsParse problems with inherited JAVAX WS CORE fields
I have a return class, which has its attributes set to return in the response in json or xml, depending on the query. I need to insert two new fields in this return, but they are very specific, that…
-
-1
votes1
answer41
viewsEndpoint Rest with Jersey shows no expected result
I created a Javaee project directly in Intellij and added the Javaee 8 dependencies via Maven. The structure of the project is in this link. web xml.: <?xml version="1.0" encoding="UTF-8"?>…
-
-1
votes2
answers245
viewsError 404 - The requested Resource is not available. Jersey REST
When starto the Tomcat he calmly calls the Hello World on index.jsp. But when I call @Path it gives 404. I’m calling: http://localhost:8080/backend/service/todosClientes. I’m wearing the Soapui…