You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Igal Sapir <is...@apache.org> on 2019/04/29 02:51:48 UTC

Enabling Jasper when running in IDE

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