Skip to content
Advertisement

Tag: jax-rs

Jax-rs annotation Path is not work in java spring boot?

I have spring boot application with starter version 2.1.16, and spring-boot-starter-web dependency. So, i want use javax.ws.rs-api library, and add dependency: So when i create controller, and add @Path, @Get – i don’t get answer from the server (404 not found). How makes it work? Answer Add the following dependency in your pom.xml if you use spring boot starter version

Is there an elegant way to exit ClientRequestFilter?

I implemented a ClientRequestFilter. But one call of a client should not be filtered, which means if the request comes from this class (in my case the class is called TokenClient) the method should just return. Right now as you can see I check the path and if it contains /token it will return. But I would rather check if

How to response with JSP file using JAX-RS?

I’ve just started learning Java. I’m trying to create a simple CRUD web application using JAX-RS. I’d like to have a few pages with forms that will be sending data to my API resources. Unfortunately, I don’t understand how I can render an html page using JAX-RS. Perhaps there is another way to do that? pom.xml web.xml UserResource.java Answer I

No response on a GET query to JAX-RS service

I have a service that has two classes and is very simple: and Commented lines are the ones that I tried to use. Every time I call “http://localhost:8080/api/hello-world” or “http://localhost:8080/api” the response is 404-Not Found. I use Tomcat 9.0.50. What can be wrong with my usage of the classes or their calling from the outside? Answer The problem was –

Advertisement