Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Implementing org.eclipse.jetty.server.RequestLog in logback-access for Jetty 12

Hi Ceki,

On Mon, Jan 22, 2024 at 10:31 AM Ceki Gulcu via jetty-dev
<jetty-dev@xxxxxxxxxxx> wrote:
>
>
> Hello All,
>
> In the context of the logback-access project, I am trying to implement
> the RequestLog interface for Jetty 12.
>
>
> The logback-access project has implementations of the RequestLog
> interface for earlier versions of Jetty, e.g. versions 9, 10, 11.
> In these earlier versions of Jetty, the org.eclipse.jetty.server.Request
> class was also an implementation of
> jakarta.servlet.http.HttpServletRequest interface.
>
> In Jetty versions 12 however, and as far as I understand, this is no
> longer the case.

Correct.

> Given  org.eclipse.jetty.server.Request or o.e.j.s.Response, how can I
> obtain the corresponding jakarta.servlet.http.HttpServletRequest or
> HttpServletResponse in Jetty 12?

You don't want to do that, because there may be no Servlet support at all.

All the information you can pull out from HttpServletRequest can be
pulled out from Request.

This may help you:
https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#pg-migration-11-to-12-servlet-to-handler

Cheers
-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top