I have a question regarding the above section in the user guide for
Struts 1.3.8, which can be found here:
http://struts.apache.org/1.3.8/userGuide/configuration.html#config_add
In particular, I'm interested in the following paragraph:
-----------------
When a class is loaded from a shared class loader, static variables used
within that class become global as well. This can cause inter-webapp
conflicts when the underlying code assumes that the statics are global
only within a particular web applicaiton (which would be true if the
class was loaded from the webapp class loader). There are many cases
where the framework, and the Commons libraries it relies on, use static
variables to maintain information that is presumed to be visible only
within a single web application. Sharing these JAR files can cause
unwanted interactions, and probably cause incorrect behavior.
-----------------
Can someone point me (or at least give me a clue) where a potential
problem may exist? I've configured my server to have a shared set of
Commons and Struts jars (something I did before reading the above
paragraph), and it appears to work, but I'd like to investigate a few
situations which may cause problems to better understand the possible
pitfalls.
One possible problem that I've run into is that the tag library
descriptors can't be 'found' when the Struts jar files are controlled by
another class loader. In the environment I'm using (SAP Netweaver -
please, no laughter :-) ) the Struts jar files are loaded by one class
loader, and the application is loaded by another. There's a reference
from the application class loader to the Struts class loader, so all the
jar files can be seen; I can even use the class loader in the
application to load META-INF/tld/*.tld from Struts, so I can see the tag
lib descriptors; however, Struts seems unable to find the files, so I've
had to copy the descriptors into WEB-INF/tld - it works, but I don't
particularly like it. If I'm going to share the jar files, I may as
well share the taglibs too...
Thanks for your help!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]