Howdy,
I am using Eclipse 2.1.3, Lomboz 2.1.3 and TC4.1.27 developing webapp based
on
Struts1.1. I created a Eclipse project under f:\strutsdemo, and a webmod
under directory f:\strutsdemo\demo.
All my servlets and JavaBeans were created under directory f:\strutsdemo,
and I add this directory to TC's classpath as to let TC find my servlets.
If my webapp(i.e. webmod) are not based on struts , TC can find my servlets
and my webapp will work fine.
The problem is : because my webapp were based on struts, struts' classloader
mechanism will not find servlets if they are not put in webapp's
WEB-INF/classes
or WEB-INF/lib , as my situation.
Here is the code snippet from the class org.apache.struts.util.RequestUtils,
ClassNotFoundException will be thrown by this function.
//--- code ---
public static Class applicationClass(String className) throws
ClassNotFoundException {
// Look up the class loader to be used
ClassLoader classLoader =
Thread.currentThread().getContextClassLoader();
if (classLoader == null) {
classLoader = RequestUtils.class.getClassLoader();
}
// Attempt to load the specified class
return (classLoader.loadClass(className));
}
//--- code ---
So My question is: How to configure Tomcat 4.1.27 which will lauched by
Lomboz
in Eclipse to find servlets not with \WEB-INF\classes or \WEB-INF\lib? or
shall
I change Struts's classloader policy?
TIA
BTW, if I configure eclipse project's output path to
f:\strutsdemo\demo\WEB-INF\classes (demo is the webapp dir), Eclipse (or
Lomboz)
will create another webapp under directory \WEB-INF\classes, there will be
two
nested webapps :), I had to use the default configuration.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]