Hello there.
I'm trying to use the StandardContext in the org.apache.catalina.core.* package to retreive the docBase from the context. I have experience using the java.naming.Context and the java.naming.InitialContext classes, but can't seem to get the StandardContext to work. I've included the catalina 5.5.9 jar in my classpath and things seem to compile correctly, but I get runtime errors.
In all honesty, I can't even get this to work:
StandardContext tomcatContext = new StandardContext();
When I load the page I get this error:
ERROR - Servlet.service() for
servlet action threw exception java.lang.NoClassDefFoundError: org/apache/tomcat/util/http/mapper/Mapper at org.apache.catalina.core.StandardContext.<init>(StandardContext.java:377
Has anyone tried to do this before? All I really want to be able to do is StandardContext.getDocBase(). That's all.
Thanks for your time!
bryan