Remy Maucherat wrote: > [EMAIL PROTECTED] wrote: >> costin 2003/03/17 12:53:40 >> >> Modified: jasper2/src/share/org/apache/jasper Tag: tomcat_4_branch >> JspC.java >> Log: >> I don't know if this can make it into the release - but I can't get >> jspc to work as an ant task without this. >> The problem is that struts is using the thread class loader to locate >> some classes at compile time ( which is correct ), and we don't have it >> set. >> >> Feel free to revert if it causes any problem or if you have a better >> solution. > > The patch isn't present in the 5.0 codebase, and it appears to work fine. > > I have to note that I had added the same code in 5.0 in my attempts to > fix the issues with the tag files (before Kin-Man properly fixed it), > and ran into a lot of CL errors because of it. So it could be causing > issues.
I'm using JDK1.4.1. Different versions of Struts behave differently. The root of the problem is loading of resources or other classes at translation time. Some programms ( including various versions of struts ) use the thread class loader - which in "normal" use case is a good choice and will find jars in the webapp. For precompile - if we don't set the thread loader, then all the code that uses it will fail - at least if we use ant and a classpath. It'll probably work if everything is included in the CLASSPATH. I can try some workarounds for my build - but I think setting the thread loader to emulate the runtime compilation ( where the TCL is set ) is the right solution. I just don't see how it could work otherwise for jars that expect it to be set. Costin > We'll see if people can reproduce the precompilation problem with 4.1.23 > (I can't on JDK 1.4.1; which JDK are you using ?), and otherwise, I'd > feel safer if the patch was reverted. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]