Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Jetty Handlers

I am the creator of jamonapi.com which is an open source java monitoring tool.  In Jetty 6.15 I provided a jetty Handler that allowed users to easily track page performance, exceptions, bytes sent, http status codes and more.   It doesn't work in later versions of jetty.

Here is the code for the JAMonJettyHandler
https://sourceforge.net/p/jamonapi/jamonapi/ci/master/tree/jamon/src/main/java/com/jamonapi/http/JAMonJettyHandler.java

The response and Request used to be able to be retrieved with the following methods.  How is that done in more current versions of Jetty?

HttpConnection.getCurrentConnection().getRequest();
 HttpConnection.getCurrentConnection().getResponse();
*****

final Request baseRequest = (request instanceof Request) ? ((Request)request) : HttpConnection.getCurrentConnection().getRequest();

final Response baseResponse = (response instanceof Response) ? ((Response)response) : HttpConnection.getCurrentConnection().getResponse();


Back to the top