JspServlet describes and reads a servlet init parameter 'classpath'. Documentation says: "classpath - What class path should I use while compiling generated servlets? By default the classpath is created dynamically based on the current web application." Current behaviour is that the configured classpath is only considered if no classpath is configured as servlet context attribute. ---JspRuntimeContext:335---- String cp = (String) context.getAttribute(Constants.SERVLET_CLASSPATH); if (cp == null || cp.equals("")) { cp = options.getClassPath(); } It seems that when running within tomcat the context attribute is usually present and therefore the classpath from the servlet init parameter is not considered.
I should add that I put the mapping in the web.xml deployment descriptor of my webapp, not as part of [tomcatroot]/conf/web.xml.
This parameter will never be used when Jasper is used within Tomcat. I have updated the docs accordingly. The updated docs will be in 5.5.21 onwards. The reason for this behaviour is that classes required for compilation will almost certainly be required at runtime so they need to be visible to the web application's class loader rather than added via this parameter.