Re: [jetty-users] My CORS proxy using Jersey (for JAX-RS) with Jetty 9.4.31 doesn't respond

2020-08-07 Thread gouessej
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 : goues...@orange.fr
> 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
jetty-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users


Re: [jetty-users] My CORS proxy using Jersey (for JAX-RS) with Jetty 9.4.31 doesn't respond

2020-08-07 Thread gouessej
Adding a "/" at the beginning of the path doesn't solve my problem.

 

 

> Message du 07/08/20 08:56
> De : "Simone Bordet" 
> A : goues...@orange.fr
> 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
jetty-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users


Re: [jetty-users] Cache-control

2020-08-07 Thread Greg Wilkins
John,

can you give me an actual sequence of requests and responses with all the
headers.

thanks


On Thu, 6 Aug 2020 at 11:14, John English  wrote:

> On 04/08/2020 19:38, Greg Wilkins wrote:
> > John,
> >
> > Can you capture some examples of headers from requests and responses
> > that are not being cached.
>
> Closer inspection shows that pages are being cached, even though the
> browsers don't show any cached data under "Memory" in the dev tools. The
> header I'm getting is "Cache-control: max-age=0" and I get a 304
> response to tell the browser to use the cached copy. I'm not generating
> the Cache-control header in my webapp.
>
> The fact that the CSS sometimes doesn't load makes me think that I'm
> sometimes not getting the response...?
>
> > Also can you describe how you are serving the content as well?  Is the
> > CSS just static content? Do you have any filters involved?
>
> The CSS is static, so is being served by the default servlet. JavaScript
> goes through a filter which does I18N translation for error messages
> etc. on specially-tagged strings. When the CSS fails to load, I haven't
> looked to see if the JS has loaded. Next time this happens, I'll have a
> look at headers etc. to see if I can find out any more.
>
> Thanks,
> --
> John English
> ___
> jetty-users mailing list
> jetty-users@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
>


-- 
Greg Wilkins  CTO http://webtide.com
___
jetty-users mailing list
jetty-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users


Re: [jetty-users] My CORS proxy using Jersey (for JAX-RS) with Jetty 9.4.31 doesn't respond

2020-08-07 Thread gouessej
I've just compared with a working project using Wildfly and RestEasy, I 
shouldn't need to add a '/' at the beginning but I'll give it a try just in 
case Jersey behaves differently.

 

 

 

> Message du 07/08/20 08:56
> De : "Simone Bordet" 
> A : goues...@orange.fr
> 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
jetty-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users


Re: [jetty-users] My CORS proxy using Jersey (for JAX-RS) with Jetty 9.4.31 doesn't respond

2020-08-07 Thread Simone Bordet
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
jetty-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users