Pierre Métras wrote:
> The ClassNotFoundException indicates that Struts can't find your class along
> the application CLASSPATH, using the Java classloader.

Right; I should have made it clear that I've been working with Java
professionally for years, i.e. I know what the exception means.  (Even
so, classpath problems STILL nip you in the butt if you aren't careful!
:-))

> Check these points:
> - Your .java file defines the class as belonging to the package
> my.app.packages.

Yep.

> - Your .class file is under /webapps/WEB-INF/classes/my/app/packages when
> unwarred.

Verified.  (Under $TOMCAT_HOME/webapps etc., actually).

> - You defined it in action.xml using the class full name.
>   <action    path="/yourAction"
>       actionClass="my.app.packages.TheActionClass"
>     formAttribute="myForm"
>         formClass="my.app.packages.TheActionForm">

Verified.

Any other ideas?  I've edited ActionMapping.createActionInstance() so
that it dumps the "java.class.path" system property to STDOUT
immediately before calling Class.forName().  That class path does NOT
contain the unwarred war file in the tomcat webapps directory (I thought
it would, but maybe Tomcat's classloader doesn't set/use this
property?).  Is this good/bad?

Cheers,
Laird

--
W: [EMAIL PROTECTED] / P: [EMAIL PROTECTED]
http://www.amherst.edu/~ljnelson/
Good, cheap, fast: pick two.

Reply via email to