Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Reflection Inside Tomcat engine

Thread view: 
Claudio! - 08 Feb 2006 09:40 GMT
Hi!
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
Tomcat.

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!!!

Claudio.
Tobias Schierge - 08 Feb 2006 12:39 GMT
> 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.

Regards,

Tobias


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.