tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Rouse <>
Subject tomcat 8 context.xml problems
Date Fri, 07 Nov 2014 21:44:29 GMT
Migrating to 8.0 and am having trouble with a custom Resource loader. Below is my context.xml

                <Resources className="com.comsquared.idw.catalina.ext.MyCustomStandardRoot"
                <Loader loaderClass="com.comsquared.idw.catalina.ext.MyClassLoader" delegate="true"
                                useSystemClassLoaderAsParent="false" />
                <Resource name="jdbc/ImageDirectorWorkflowDS" type="javax.sql.DataSource"
factory="com.comsquared.idwm.DataSourceFactory" />

I am not concerned about the datasource right now. But when I try to get the context

org.apache.catalina.Context ctx = this.getContext();

ctx is null. Do I need to add something to the context.xml file? The docs only mention this:

"The standard implementation of Resources is org.apache.catalina.webresources.StandardRoot,
and is configured by its parent Context element."

But no mention about how a custom implementation of Resources gets its Context. I would assume
from its parent as well. But how do I get the parent context?

Thanks, Ed.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message