Hi Swamy,
Originally posted by Ramaswamy Srinivasan:
On my removing the servlet.jar from my application, what if I am deploying it on another server? Isn't the "lib" directory of my application a mandatory one?
Extracted from servlet specification 2.4, section 9.7.2:
SRV.9.7.2 Web Application Class Loader
The class loader that a container uses to load a servlet in a WAR must allow the developer to load any resources contained in library JARs within the WAR following normal J2SE semantics using getResource . As described in the J2EE license agreement, servlet containers that are not part of a J2EE product should not allow the application to override J2SE platform classes, such as those in the java.* and javax.* namespaces, that J2SE does not allow to be modified. Also, servlet containers that are part of a J2EE product should not allow the application to override J2SE or J2EE platform classes, such as those in java.* and javax.* namespaces, that either J2SE or J2EE do not allow to be modified. The container should not allow applications to override or access the container�s implementation classes. It is recommended also that the application class loader be implemented so that classes and resources packaged within the WAR are loaded in preference to classes and resources residing in container-wide library JARs.
I think by placing servlet.jar under the application lib violated the rule "servlet containers that are not part of a
J2EE product should not allow the application to override J2SE platform classes, such as those in the java.* and javax.* namespaces,...". If you deploy on other web container such as Orion, such classes with namespaces javax.* can be found in orion.jar too.
Just curious, why do you need the servlet.jar in the application lib since a web container has its own version?
Let's see if others may have different opinions or workarounds.
Joyce
[ October 18, 2004: Message edited by: Joyce Lee ]