Set writeListener to servletoutputstream outside the container thread not working, the latest working version is tomcat 8.0.18, after that, onwritepossible never called, also outputstream.isready() already return false.
Thanks for the report. This has been fixed in trunk (for 9.0.x) and in 8.0.x (for 8.0.24 onwards).