Thank you for your help, I've just found the solution. Using @ApplicationPath
while declaring the javax.ws.rs.Application implementation in web.xml without
setting the servlet mapping in the same file was a bad idea. I thought about
that when you suggested to add a "/" at the beginnging of the path:
diff --git
a/src/main/java/fr/gouesse/julien/jaxrs/RedFeedAggregatorApplication.java
b/src/main/java/fr/gouesse/julien/jaxrs/RedFeedAggregatorApplication.java
index 0af216b..e4322e5 100644
--- a/src/main/java/fr/gouesse/julien/jaxrs/RedFeedAggregatorApplication.java
+++ b/src/main/java/fr/gouesse/julien/jaxrs/RedFeedAggregatorApplication.java
@@ -5,7 +5,6 @@ import java.util.Set;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
-@ApplicationPath("webresources")
public class RedFeedAggregatorApplication extends Application {
@Override
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index a0ba8a8..a386c83 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -418,13 +418,18 @@
- fr.gouesse.julien.jaxrs.RedFeedAggregatorApplication
+ jersey
org.glassfish.jersey.servlet.ServletContainer
-
jersey.config.server.provider.packages
-
fr.gouesse.julien.jaxrs
+
javax.ws.rs.Application
+
fr.gouesse.julien.jaxrs.RedFeedAggregatorApplication
1
+
+
+ jersey
+ /webresources/*
+
> Message du 07/08/20 08:56
> De : "Simone Bordet"
> A : [email protected]
> Copie à : "Simone Bordet" , "JETTY user mailing list"
> Objet : Re: [jetty-users] My CORS proxy using Jersey (for JAX-RS) with Jetty
> 9.4.31 doesn't respond
>
> Hi,
>
> On Fri, Aug 7, 2020 at 6:57 AM wrote:
> >
> > I still get an HTTP error 404 with your suggestion.
> >
> >
> >
> > diff --git a/src/main/java/fr/gouesse/julien/jaxrs/CorsProxyResource.java
> > b/src/main/java/fr/gouesse/julien/jaxrs/CorsProxyResource.java
> > index 1e0c09c..ee0f4f0 100644
> > --- a/src/main/java/fr/gouesse/julien/jaxrs/CorsProxyResource.java
> > +++ b/src/main/java/fr/gouesse/julien/jaxrs/CorsProxyResource.java
> > @@ -20,7 +20,7 @@ import javax.ws.rs.core.MediaType;
> >
> > import javax.ws.rs.core.Response;
> > import javax.ws.rs.core.Response.Status;
> >
> > -@Path("corsproxy")
> > +@Path("webresources/corsproxy")
>
> Don't you need a "/" at the beginning of the path?
>
> --
> Simone Bordet
> ----
> http://cometd.org
> http://webtide.com
> Developer advice, training, services and support
> from the Jetty & CometD experts.
>_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users