When running Tomcat (using 9.0.x with default settings) in an IDE I get an NPE when trying to access JSP files. I have traced it down to the fact that the JspFactory.setDefaultFactory() is never called and therefore getDefaultFactory() returns null.
When launching using the catalina.sh script, WebappServiceLoader.load() finds two classes, org.apache.jasper.servlet.JasperInitializer and org.apache.tomcat.websocket.server.WsSci, via ServletContainerInitializer's (SCI), which loads and initializes them, and therefore they work properly. How can I initialize these when running in an IDE? Thanks, Igal