User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0
It is a server side error, the client is my browser on localhost.
Unfortunately this is not on any form of GIT. Only the (Scala) code
is in an SVN repo. I left everything mostly as it as in the Jetty11
code.
This is the code that sets up the SSL connector:
val sslContextFactory = new SslContextFactory.Server
sslContextFactory.setRenegotiationAllowed(false)
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS")
sslContextFactory.setKeyStorePath(keyStore)
sslContextFactory.setKeyStorePassword(keyPassword)
sslContextFactory.setKeyManagerPassword(keyPassword)
sslContextFactory.setKeyStoreType(keyStoreType)
sslContextFactory.setEnableOCSP(true)
sslContextFactory.setSessionCachingEnabled(true)
sslContextFactory.setSniRequired(true)
val httpsConfig = new HttpConfiguration
httpsConfig.setSecureScheme("https")
httpsConfig.setSecurePort(port)
httpsConfig.setSendXPoweredBy(false)
httpsConfig.setSendServerVersion(false)
httpsConfig.setOutputBufferSize(32768)
httpsConfig.addCustomizer(new HostHeaderCustomizer)
httpsConfig.addCustomizer(new SecureRequestCustomizer)
val http1 = new HttpConnectionFactory(httpsConfig)
val http2 = new HTTP2ServerConnectionFactory(httpsConfig)
val alpn = new ALPNServerConnectionFactory
alpn.setDefaultProtocol(http1.getProtocol)
val ssl = new
SslConnectionFactory(sslContextFactory,alpn.getProtocol)
val http2Connector = new
ServerConnector(server,ssl,alpn,http2,http1)
if (address != null) http2Connector.setHost(address)
http2Connector.setPort(port)
http2Connector.setIdleTimeout(1000L * idleTimeout)
server.addConnector(http2Connector)
This sets up the servlet context:
val ctx = new ServletContextHandler
ctx.setContextPath(contextPath)
val sh = new SessionHandler
sh.setUsingCookies(false)
sh.setSessionIdPathParameterName(ServletContainer.sessionIdName)
sh.setMaxInactiveInterval(sessionTimeout)
ctx.setSessionHandler(sh)
val holder = new ServletHolder(servletClass)
val mc = new
MultipartConfigElement(System.getProperty("java.io.tmpdir"),uploadLimit,uploadLimit,fileSizeThreshold)
holder.getRegistration.setMultipartConfig(mc)
ctx.addServlet(holder,servletPath)
And finally the server:
val ctxHandler = new ContextHandlerCollection
ctxHandler.setHandlers(ctx)
server.setHandler(ctxHandler)
server.start
My build.sbt (Scala build script that refers to the Maven repo's)
contains:
This helped a lot. After some tweaking I got the code that
sets up an embedded server to compile. It even runs and
starts a server, logs some messages and loads/logs my
certificates. But when I send a request I get
2023-08-10 14:47:15.917:WARN
:oeji.ManagedSelector:qtp1582071873-42: Could not accept
java.nio.channels.SocketChannel[closed]:
java.lang.NoClassDefFoundError:
org/eclipse/jetty/io/ssl/SslConnection$DecryptedEndPoint
I must be missing some runtime dependency. The class
org.eclipse.jetty.io.ssl.SslConnection is found during
compile time (after adding jetty-io). Any suggestions?
Thanks,
Silvio
On 10-08-2023 13:22, Joakim Erdfelt wrote:
There are 3 jetty-servlet replacements.
org.eclipse.jetty.ee10:jetty-ee10-servlet - Jakarta
EE10 - Servlet 6 (jakarta.servlet namespace)
org.eclipse.jetty.ee9:jetty-ee9-servlet - Jakarta
EE9 - Servlet 5 (jakarta.servlet namespace)
org.eclipse.jetty.ee8:jetty-ee8-servlet - Jakarta
EE8 - Servlet 4 (javax.servlet namespace)
Pick the ee# that best suits the needs of your
project.
Is that an error in the docs or is the artifact
missing from the repo?
Kind regards,
Silvio
On 07-08-2023 22:38, Joakim Erdfelt via
jetty-users wrote:
Hello!
The Jetty team is happy to announce the
immediate availability of Eclipse Jetty 12.0.0
This release includes a major change to the
structure of Jetty.
Jetty Core
This Jetty Server / Jetty Client core, and
is now 100% free from any specific Jakarta
EE technology (such as Jakarta Servlet)
You can use this layer independent of any
specific EE environment.
Jetty EE Environments
We ship with support for 3 environments
initially.
EE10 - Jakarta EE 10 (jakarta.*) - Servlet
6 - JSP 3.1 - JSTL 3.0 - WebSocket 2.1
EE9 - Jakarta EE 9 (jakarta.*) - Servlet
5 - JSP 3.0 - JSTL 2.0 - WebSocket 2.0
EE8 - Jakarta EE 8 (javax.*) - Servlet
4 - JSP 2.3 - JSTL 1.1 - WebSocket 1.1
Jetty Integrations - where the
integration with external projects is housed
NoSql
Memcached
Infinispan
Hazelcast
Commercial production and development support
for Jetty is offered through Webtide (webtide.com).
Please contact us for more information or
email jesse@xxxxxxxxxxx
to discuss your specific needs.