Configuring GZipHandler programatically

34 views
Skip to first unread message

Alain Picard

unread,
Feb 17, 2021, 7:54:20 AM2/17/21
to OPS4J

Hi,

I searched and found the group talk and issue regarding support for GZipHandler but this seems to rely on using a jetty.xml file.

How can I do it programmatically since this is not just a regular Handler but a HandlerWrapper that needs to have it's handler set and I can't seem to be able to get such a reference to pass it back when attempting to register it as a service.

Cheers,
Alain

Grzegorz Grzybek

unread,
Feb 22, 2021, 8:40:46 AM2/22/21
to op...@googlegroups.com
Hello

Sorry for late response. To be honest - this will look differently in Pax Web 8, because I'm rewriting the configuration aspects of Pax Web.
Handlers are Jetty specific and I'm afraid that for now you have to dig in the code yourself (I've never used this mechanism of OSGi-registration of Jetty handlers/handlerWrappers).


And you're right - for now if you need a handler *wrapper* you need an instance of the handler being wrapped - the existing org.ops4j.pax.web.itest.jetty.JettyHandlerServiceIntegrationTest test simply ADDS different handler that's invoked AFTER (not AROUND) existing Pax Web provided one...

Indeed - I'll remember that ability to install real wrappers (same for Tomcat valves and Undertow handlers) would be great-to-have in Pax Web 8.

regards
Grzegorz Grzybek

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/49b02792-d1a2-473d-8ba6-d4b05eb4ba0dn%40googlegroups.com.

Alain Picard

unread,
Mar 9, 2021, 11:07:47 AM3/9/21
to op...@googlegroups.com
Hi,
Now for my own late response. I finally used a jetty.xml to get it to work with the current version. I must just say that the one referenced in PAXWEB-1189 didn't work for me and I ended up using one with an insert handler instead and that worked.

Thanks for your help.

Alain

You received this message because you are subscribed to a topic in the Google Groups "OPS4J" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ops4j/JIIEVzQ6YWg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CAAdXmhq3v2R3b1-UgEUTYy%2BdGDr-aBfKYP_YXhMFdYo1n5SEsQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages