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

Jetty 12 has no dependency on the servlet spec anymore.

The servlet classes only exist for specific environments.

"ee8" - based on Servlet 4, has javax.servlet.
"ee9" - based on Servlet 5, has jakarta.servlet
"ee10" - based on Servlet 6, has jakarta.servlet

The RequestLog mechanism for Jetty 12 is based on "core" which has no Servlet dependency.
It is entirely possible (and growing quite popular) to run a server on Jetty 12 without using the Servlet layer.

Like Simone pointed out, you want logback-access to implement the core org.eclipse.jetty.server.RequestLog
And document that it should be added to the Server via a call to Server.setRequestLog(new LogbackAccessRequestLog())
For standalone users you can provide a jetty-start module that downloads the required jars and associated XML from maven central (or any arbitrary URL) and then makes it available correctly to their jetty.base instance.

Joakim Erdfelt / joakim@xxxxxxxxxxx


On Mon, Jan 22, 2024 at 3: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.

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?

Many thanks for your assistance.

--
Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-dev

Back to the top