Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Reflection Inside Tomcat engine

Thread Tools

Reflection Inside Tomcat engine

Posts: n/a
I neet do use Digester inside a Servlet to parse an XML file.

Now, the problem is that Digester use the reflection to create on the
fly the objects associated to the various entity of the XML file.

The classes that Digester have to instantiate via reflection are
developped by me, and (for now) they stay under WEB-INF/classes.

The problem is that when the parsing start (inside the servlet),
Digester can't see that classes as the ClassNotFoundException arise.

Some days ago I've read that the problem is relative to the Tomcat's
classloader. At that time i put that class in a JAR under WEB-INF/lib
but this didn't work. So I moved it under WEB-INF/classes, but also
this seem to not work.

It works only if i put that class in a JAR under dir. "commons/lib" of

It is normal? I want it under "WEB-INF/classes" if it is possible (the
deploy of application would be easier)

I'm using Java 1.4.2 and Tomcat 5.0.30.

Thank you for any help!!!


Reply With Quote
Tobias Schierge
Posts: n/a
> It is normal? I want it under "WEB-INF/classes" if it is possible (the
> deploy of application would be easier)

Try putting your own commons-digester and related jars also into
web-inf/lib, then it should work.

If you refer to tomcat internal classes classloading may be messed up.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
searching for a rule engine that compiles rules, no reflection NOBODY Java 4 04-18-2006 11:29 PM
wiki engine (just engine) available? Python 1 04-10-2006 07:58 AM
Is ASP Validator Regex Engine Same As VS2003 Find Regex Engine? =?Utf-8?B?SmViQnVzaGVsbA==?= ASP .Net 2 10-22-2005 02:43 PM
EOS 10D: inside reflection problem Rari Digital Photography 7 01-18-2004 11:32 AM
EOS 10D Inside reflection problem Dragan Cvetkovic Digital Photography 8 10-03-2003 10:45 AM