Joakim Erdfelt / [email protected]

On Tue, Feb 2, 2016 at 3:19 AM, Conundrum <[email protected]> wrote:

> Hello
>
> I am trying to test the server push feature on a static website with
> standalone Jetty.
>
> My website consists of an index.html  + 1 CSS + a bunch of images. The
> directory structure is:
>
> /Album
>        |
>        |-----index.html
>        |-----style.css
>        |------/images
>                  |
>                  |-----  image 1
>                  |---a set of about 100 images
>                  |---image100.png
>
>
> As I just wanted to quickly test out the server push feature I did not
> code this website as a Java Web project and, therefore, didn't have any
> web.xml file.
>
> However, the Jetty documentation asks to add PushCacheFilter to web.xml.
> Therefore, I created a /Album/WEB-INF/web.xml in my project and added the
> PushCacheFilter as the documentation specified.
>

This is the correct way to handle it.


>
> First, I am unable to understand from the documentation how exactly
> PushCacheFilter works.
> Secondly, I want to control which files get pushed and which do not. From
> the documentation, it seems PushCacheFilter doesn't give me that kind of
> control.
>

https://www.eclipse.org/jetty/documentation/current/http2-configuring-push.html

It's documented there, look at the mention of Referer.

The support for custom Push is only in jetty master branch (unstable Jetty
9.4.0) atm, which is based on an early draft of the Servlet 4.0 PushBuilder
interface.
Added in commit
https://github.com/eclipse/jetty.project/commit/5093aa3d405dc3b048d6f65b4d42315670e4195c

- Joakim
_______________________________________________
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