----- Original Message ----- From: "Nikola Milutinovic" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Sunday, January 23, 2005 12:32 PM
Subject: Re: ?? Sharing the JSTL JARS and Classloading ??
One other note - Tomcat gives you a framework contract, a contract defined by JSP/Servlet specification. There is no mention of JSTL in it. Thus, it is unwise to make it shared, since it involves making the JSTL more internal than external, from Tomcat's point of view.
Nic,
You are right: Tomcat provides a contract via it's implementation of the Servlet/JSP spec and the JSTL has absolutely nothing to do with it. Tomcat *also*, however, provides an alleged facilty ("shared/lib") for the sharing of JAR file across web applications. This capability is independent of the Servlet/JSP specs but it is supposed to work with Tomcat.
There's a more important issue at work here than whether or not I have to put the JARs in "common/lib" or "shared/lib": When writing code it's considered a bad practice (and I think, rightfully so) to "copy and paste" the same code to various locations. Instead, we factor out common behavior into separate classes or methods. There's an analogous idea involved here -- instead of "copying and pasting" the same JARs across many web applications it makes more sense (to me, anyway), to factor out these JARs and make them "centrally available". Having said that, I also realize the code within the JARs must be written such that the classes can be shared.
Think of .so files or .DLL files. With .DLL files, for example, Windows will share the library's contents across several processes rather than load the same DLL each time for every process. I think this is a good strategy, again, assuming the classes in the JAR were written so as to be shared. It's not a matter of disk or memory space, per se, it's more a matter of "administrative convenience".
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]