Installing the WebSocket Extension on Tomcat got much easier

FYI: I was able to get the SessionInitializerFilter into the code base of Tomcat 9, 8.5, 8, and 7: Provide the SessionInitializerFilter that can be used to ensure that … · apache/tomcat@44aa9d8 · GitHub

This means that installing the Lucee WebSocket Extension in future versions of Tomcat (9.0 official release, 8.5.24, 8.0.48, 7.0.83 or later) will be much easier, because the filter is now deployed with Tomcat and there is no need to add an external jar file for it.

To configure the filter simply add the following snippet to your web.xml deployment descriptor:

<!-- Required for the Lucee WebSocket Extension !-->    
<filter>
  <filter-name>SessionInitializerFilter</filter-name>
  <filter-class>org.apache.catalina.filters.SessionInitializerFilter</filter-class>
</filter>

<filter-mapping>
  <filter-name>SessionInitializerFilter</filter-name>
  <!-- modify url-pattern to match your websocket endpoint !-->
  <url-pattern>/ws/*</url-pattern>
</filter-mapping>
4 Likes

That’s awesome work!

1 Like

So we no longer need the servlet-filter-utils-1.1.1.jar jar file?