On Fri, 30 Mar 2001, Marc Saegesser wrote:
> 1. Classes loaded by the container take precedence over classes from Jar
> files in WEB-INF/lib. In tomcat 3.x there really isn't anything we can do
> about this. The Servlet 2.3 (Proposed Final Draft) specification allows
> containers to let classes inside the web application override those from the
> container (section 9.6.2). Tomcat 4.0 implements this specification and
> does support this feature.
Marc, a small correction here: tomcat 3.3 doesn't have this problem - the
container is loaded in a completely separated class loader ( that includes
jaxp, parser, modules, etc) - the webapplications and the container are
sharing only javax.servlet.* package and the core ( i.e. 6 classes + 10
utils - not even that is required and you can reconfigure that )
That means you shouln't have any problem with "sealing" or plugging a
different parser.
The downside is that webapps no longer have a parser provided by default -
but that's easy to fix by including one in lib/apss ( not necesarily the
same used by the container ).
With the (experimental) ProfileLoader you can have different jaxp parsers
or jars available to groups of applications.
Tomcat 3.3 doens't support the "overriding" feature - but it doesn't have
anything exposed that would need to be overriden - the apps get a clean
environment, unless configured in a different way - in which case the
configured jars do override the app jars. ( this is important for things
like JDBC drivers and sandboxing, since you'll grand permissions to the
container's jar - instead of granting them to the jar in the webapp that
can be corupted.
Nacho can explain more about this, as he did most of the work.
Costin
( of course, the 3.3 loading also support the "multiple facades" feature -
but it needs some special configurations to run servlet23/servet22 at the
same time )