-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Servlet 4 and HTTP2 #490
Comments
Good news. I have a POC (a demo) for HTTP/2 in Pippo.
So, now I can show the code and some pictures: The important columns (right table) are:
Code:
# SSL configuration
server.keystoreFile = keystore.jks
server.keystorePassword = password
server.truststoreFile = truststore.jks
server.truststorePassword = password I posted the code on On my test branch I switched Pippo from Servlet 3.x to Servlet 4 to use the new features. The process was painless. Unfortunately the last Jetty version (9.4) doesn't implement Servlet 4 specification and from this reason I used in my demo the Jetty specific API. In the end, I can say that the code looks simple enough and it was a pleasure to work on/with this feature. Any feedback is welcome. |
To switch my HTTP/2 demo from Jetty to Undertow, all I made is to upgrade Undertow to the last version (2.0.17.Final). HttpServletRequest httpServletRequest = routeContext.getRequest().getHttpServletRequest();
PushBuilder pushBuilder = httpServletRequest.newPushBuilder();
getPushResourcePaths(html).forEach(path -> pushBuilder.path(path).push()); |
On private void enableSSLConnector(Tomcat tomcat) {
// actual code
// enable HTTP/2
connector.setAttribute("sslImplementationName", "org.apache.tomcat.util.net.openssl.OpenSSLImplementation");
// connector.setAttribute("sslImplementationName", "org.apache.tomcat.util.net.jse.JSSEImplementation");
connector.addUpgradeProtocol(new Http2Protocol());
} To go with decebal@decebal:/usr/lib$ ldd libtcnative-1.so.0.2.17
linux-vdso.so.1 (0x00007ffd61da7000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f2f2c9d9000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f2f2c70e000)
libapr-1.so.0 => /usr/lib/x86_64-linux-gnu/libapr-1.so.0 (0x00007f2f2c6d6000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2f2c6b5000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2f2c4cb000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2f2c4c5000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f2f2c4ba000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2f2ccb9000) When I run demo I obtain the below error message:
Maybe someone who uses Tomcat and who has more experience like me with Tomcat can help. |
http2 on undertow works out of the box |
Yes. I said the same thing in #490 (comment). |
The idea is to play with Servlet 4 and see how we can add support for HTTP2 in Pippo.
The text was updated successfully, but these errors were encountered: