That makes sense, I actually first try to load the class, and if it fails I then generate class and try loading again. Basically I dont want to have to generate all the time because the overhead is so high.
Is this something you will fix in 4.0.2? Matt -----Original Message----- From: Remy Maucherat [mailto:[EMAIL PROTECTED]] Sent: Friday, October 19, 2001 4:48 PM To: [EMAIL PROTECTED] Subject: Re: Tomcat 4.0.1 not loading dynamically generated classes from /webapp/WEB-INF/classes at runtime > I just upgraded from Tomcat 3.3 to 4.0.1 and it looks like there has been a > behavior change in the Classloaders that is breaking me. > > At runtime I dynamically generate, compile and then load classes. I compile > the classes into the /webapp/WEB-INF/classes directory so that I dont have > to worry about configuring classpaths or anything like that. This used to > work just fine in 3.3 but it doesn't work in 4.0.1. It seems like the > Classloader will only load classes that are in the classes dir when tomcat > starts. Anybody got any ideas? Actually, that's not exactly true. It will not attempt to load a class which it had previously tried to find (and failed to find). I thought I had changed that in one of the 4.0 RCs, but after checking, I didn't. That's strange. If you can build your own copy, just remove if (notFoundResources.containsKey(name)) return null; in WebappClassLoader.findResourceInternal. Remy
