The next version of Pax Web is about to be released. Time to take a closer look at what’s going to be included with it. First of all it it’s a minor version update, so it’s mainly upgrades for the underlying containers. Jetty is upgraded to version 9.2.5, one of its features is the support for Servlet 3.1 API (JEE7).
Tomcat is upgraded to version 8.0.14. Because there is no OSGi version of it available a Pax Tipi Project takes care of the OSGi-fied version of it. Thanks to this updated it’s now possible to also support JSP 2.3.1 with Jasper in version 2.2. Due to this Apache MyFaces 2.2.6 and higher is supported (JSF-2.2).
Thanks to this upgrade and some more fixes the support of Tomcat as underlying server with Pax Web has improved even more, though using it in an productive environment is still not recommended.
With Pax Web 4.1 and Jetty as container the JSR-356 for websockets is supported. Just add your annotated websocket classes to your bundle and Pax Web will take care of the deployment (if you use the JSR-356 annotations). This requires the jetty-websocket jars are installed (or the jetty-websocket Karaf feature).
It is enabled by Pax Web scanning the classspace of the bundle for javax.servlet.ServletContainerInitializers. Through this mechanism also other ServletContainerInitializers can be registered. Of course the OSGi way should always be the prefered way of registering ServletContainerInitializer.
Annotated Servlets via Whiteboard
Another new great feature is possible to use with Pax Web 4.1. In case you use the OSGi Whiteboard approach for registering Servlets as services. In case you have those Servlets annotated you just need to register those servlets as services. The Pax Web whiteboard extender will make sure those servlets will be registered with the correct mappings. The same applies for filters and any other annotatable class which might be registered with the Webcontainer through the whiteboard extender.
WORK IN PROGRESS!
Pax Web will try to enable SPDY by default if the needed classes are present. This requires that the npn-boot.jar is added to the lib/ext folder of the JVM or if Karaf is used of the Karaf server. And in case of Karaf that the pax-jetty-spdy feature is installed.
Unfortunately the support for SPDY which requires npn and therefore https, fails due to some strange classloading issue.