Now, JspcServletContext @Override public ClassLoader getClassLoader() { return null; } i.e. no classloader is set. This maybe throw NPE. Actually, by rev. 1431228, private void init(ErrorDispatcher err) throws JasperException { if (initialized) return; tagPlugins = new HashMap<String, TagPlugin>(); Enumeration<URL> urls = null; try { urls = ctxt.getClassLoader().getResources( META_INF_JASPER_TAG_PLUGINS_XML); } catch (IOException ioe) { throw new JasperException(ioe); } .... } threw NPE, because ctxt.getClassLoader() is null. So, we need to set the classloader in JspServletContext. I resolved this issue by adding setter of classloader in JspServletContext and setting classloader in JspC like below. protected void processFile(String file) throws JasperException { .... originalClassLoader = Thread.currentThread().getContextClassLoader(); if( loader==null ) { initClassLoader( clctxt ); context.setClassLoader(loader); <-- set classloader } }
*** This bug has been marked as a duplicate of bug 54440 ***