Thank you. I'll look into that,  it might be delayed a week as it's currently 
'working'

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
On Behalf Of [email protected]
Sent: Thursday, October 12, 2017 2:13 PM
To: [email protected]
Subject: jetty-users Digest, Vol 101, Issue 16

Message: 1
Date: Thu, 12 Oct 2017 10:35:45 -0700
From: Joakim Erdfelt <[email protected]>
To: JETTY user mailing list <[email protected]>
Subject: Re: [jetty-users] Unexpected behavior with
        ContextHandler/ResourceHandler ( with etags ) and WebAppContext and
        overlapping contexts
Message-ID:
        <cak64ejzua+n2cokvy4kml4w_wjdczys8swdeqcbwagqeb4s...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Don't mix WebAppContext with ResourceHandlers on the same context path.

Since you have a WebAppContext at contextPath "/" that means it is 100% in 
control over all content in that context.

If you want to have static resources (like what your ResourceHandler 
configuration is doing) on a different location, use an extra DefaultServlet.

See
https://stackoverflow.com/questions/20207477/serving-static-files-from-alternate-path-in-embedded-jetty

Joakim Erdfelt / [email protected]

On Thu, Oct 12, 2017 at 10:28 AM, Beleznay, David (Relic) < 
[email protected]> wrote:

> Hi there,
>
>
>
> We have 2 contexts
>
> A web app context handling /
>
> A ContextHandler with ResourceHandler with etags turned on handling 
> /html
>
>
>
> When we try to access something from the /html directory, the first 
> time it works.  ( it only goes to the ContextHandler )
>
> When we try to access it a second time the Resource handler returns a 
> 304 and does not set Committed to true ( approx. line 283 of Resource handler 
> )
> and so it falls back to the web app context.   Our WebAppContext doesn?t
> know how to handle it, and so errors.
>
> When we try a 3rd time, it?s back to working.
>
>
>
>
>
> This used to work for us on Jetty 9.3.9.v20160517  but when we 
> upgraded to jetty 9.4.6.v20170531 it broke,  I?m not sure if this 
> expected behavior or not.
>
>
>
> For now we?ve made our webapp context ignore paths starting with 
> /html, but this seems like the wrong approach.  Shouldn?t the resource 
> handler be setting handled to true ?
>
>
>
> Cheers,
>
>
>
> David Beleznay
>
>
>
>
>
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to