I did try that, but it failed:
java.lang.IllegalStateException: s=HANDLING rs=BLOCKING os=OPEN
is=READY awp=false se=false i=true al=0
at org.eclipse.jetty.server.Request.getAsyncContext(Request.java:592)
I didn’t pursue this much further, because it seemed to be fundamentally
brittle.
Also, isn’t the response fully committed when AsyncContext.complete() is
called, i.e. it’s too late to set headers, such as cookies?
On Mon, Nov 11, 2019 at 4:42 PM Simone Bordet <[email protected]> wrote:
> Hi,
>
> On Mon, Nov 11, 2019 at 5:25 PM Nils Kilden-Pedersen <[email protected]>
> wrote:
> >
> > I can't seem to find much information on how to code async filters.
> >
> > Basically, how do I know when the filter chain has completed? I need to
> set a cookie, but only at the very end of the request.
>
> You use Servlet's AsyncListener and implement onComplete().
>
> --
> 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 change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users