Questions tagged as 'jersey'

2
answers

Hibernate is not mapping classes

Hibernate I'm using is not automatically generating tables My Persistence.xml file <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/...
asked by 18.12.2017 / 18:22
1
answer

Java RESTFULL using Jersey

Well, I'm trying to develop a Java project with a Web Service REST, I'm new to this Web Service business, so I'm kind of lost. I can not access my service by the URL of the browser, when I enter the address of the Service, the browser responds w...
asked by 19.02.2017 / 07:58
1
answer

Request without @XmlRootElement

I'm doing a simple user registration with Java and AngularJS. My request in javascript looks like this: $http({ url: "rest/user/register", method: "POST", data: $scope.newUser }); In Java, I have a method that gets the data i...
asked by 21.12.2016 / 16:15
0
answers

Webservice Restfull + Jersey + Tomcat 9 return from Json without content-length

I'm developing a Webservice application with restfull + Jersey and Tomcat 9. In this system I need to return a Json from a class (Product) to an android application and use contentLength (android) to retrieve the file size and use in progress ba...
asked by 03.11.2018 / 12:47
0
answers

Java Rest with Jersey and Tomcat error 404

I'm trying to follow a rest tutorial with jersey and tomcat. But I'm getting the 404 error. Can someone help me? Here are my classes and settings: package com.programmer.gate.JerseyRestService; import javax.ws.rs.GET; import javax.ws.rs.Path;...
asked by 11.06.2018 / 22:02
0
answers

Java - Generic Type as parameter of jax rs client's readEntity method

I want to abstract a post method from my code, using generic type to facilitate implementation. The code is a client of ws using jax-rs. Follow public T2 post(T1 requisicao, String path){ javax.ws.rs.client.Client client = ClientBuilder.ne...
asked by 25.04.2018 / 21:05
1
answer

Implementing ContainerRequestFilter with Jersey

I'm doing the token implementation through this tutorial , but when I try to implement the ContainerRequestFilter the program issues the error below. The error occurs only with the implementation of the class. How can I modify my settings so...
asked by 17.03.2018 / 15:30
0
answers

pass multiple attachments via ajax

Hello, my first post here, I'm having a problem sending more than one attachment via Ajax. I have a jersey API that gets the call. if I send only one attachment works fine, but if I select more than one attachment, only one comes in. My passi...
asked by 21.09.2017 / 14:13
1
answer

Response to preflight request does not pass access control check: In 'Access-Control-Allow-Origin' header is present on the requested resource

I'm doing client / server testing where the client is being developed with angularjs and the java + tomcat + jersey server. When I try to make a client-side post, it gets to the server to the right place, but the answer is that it does not ar...
asked by 01.06.2017 / 19:59
1
answer

How to integrate CDI-Unit with Jersey Test Framework?

Hello. I'm working on a ws rest with CDI and Jersey. I want to create a unit of tests with JUnit and due to the CDI I ended up using the CDI-Unit Runner. I found the CDI-Unit simpler than WeldJUnit4Runner. Now, I need to add the Jersey Tes...
asked by 27.05.2017 / 08:12