Skip to content

Tag: servlet-listeners

javax.ws.rs.Path how to intercept just the project root without compromising all the other paths

I have this web.xml, don’t want a suffix for the url-pattern so I’m using a /* pattern: This is my RestVersion.java class that I want to manage the root requests: Where IRestVersion.java is the following: The problem is that any other path is intercepted by this RestVersion class, like this: http://localhost:8080/ —> it answers correctly with the RestVersion.version() json http://localhost:8080/asd