Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 12: org.eclipse.jetty.http.MultiPart.Part does not extend Servlet 6 jakarta.servlet.http.Part

Hi,

On Wed, Oct 16, 2024 at 7:35 PM Glen Peterson via jetty-users
<jetty-users@xxxxxxxxxxx> wrote:
>
> Is there a servlet 6 version of HTTP2ServerConnectionFactory, ALPNServerConnectionFactory, SslConnectionFactory?  This is the Jetty HTTP2 configuration I was hoping to use with a jakarta.servlet.http.HttpServlet:
>
>     val server = Server()
>     server.isDumpAfterStart = true
>     server.setAttribute("module", "session-cache-hash")
>     server.errorHandler = HoshinErrorHandler
>
>     // https://github.com/fstab/http2-examples/blob/master/jetty-http2-server-example/src/main/java/de/consol/labs/h2c/examples/server/Http2Server.java
>     // HTTP/2 Connection Factory
>     val h2 = HTTP2ServerConnectionFactory(httpConfig)
>     val alpn = ALPNServerConnectionFactory()
>
>     // SSL Connection Factory
>     val ssl = SslConnectionFactory(sslContextFactory, alpn.protocol)
>
>     // HTTP/2 Connector
>     val http2Connector = ServerConnector(server, ssl, alpn, h2, HttpConnectionFactory(httpConfig))
>     http2Connector.port = 8443
>     server.addConnector(http2Connector)
>
>     val handlers = ContextHandlerCollection()
>     handlers.addHandler(SecuredRedirectHandler())
>     handlers.addHandler(HoshinHandler)
>     server.handler = handlers
>
>     server.start()

There is no "Servlet 6" version of the classes you mention, because
they are not Servlet related, they are generic.

To write Servlet web applications using the Jetty APIs, please see the
programming guide:
https://jetty.org/docs/jetty/12/programming-guide/server/http.html#handler-use-servlet

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


Back to the top