I'm using errorReportValveClass to set a custom Error-Page Handler. I've implemented the Valve interface and placed the compiled class (with package structure of course) to the server/classes dir. Tomcat just prints the following poor message to the log (also with DEBUG level set): Couldn't load specified error report valve class: <fullclassname> That is too less information about the real problem. Couldn't it be found? Couldn't it be instanciated? Stacktrace or similar would be helpful. Also the documentation ist poor: http://tomcat.apache.org/tomcat-5.5-doc/config/host.html Nothing mentioned about where to put the custom Valve class.
Please update the documentation. --snip-- if(!found) { Valve valve = (Valve) Class.forName(errorReportValveClass) .newInstance(); addValve(valve); errorReportValveObjectName = ((ValveBase)valve).getObjectName() ; --snip-- It seems that one has to extend ValveBase - not just implemented the Valve interface.
Created attachment 19162 [details] Patch to add stracktrace to logging This will add the stacktrace to the logger when an error occurs while setting the errorReportValveClass on Host configuration.
The patch is against the 5.5.20 version.
The log message patch has been applied to SVN. Rather than amend the docs, I rewrote the code to remove the requirement to extend ValveBase. This fix will be in 5.5.21 onwards.