By default Glassfish delegates class loading to the parents in the classloader hierarchy. Thus the common classloader (responsible for domain/lib) takes precedence over the web classloader (responsible for WEB-INF/lib). You can change this behaviour by using the delegate="false" attribute of the "classloader" element of your sun-web.xml.
For more on the classloader hierarchy see:
https://glassfish.dev.java.net/javaee5/docs/DG/beade.html
For details about the sun-web.xml it's best to look at the DTD. Just look for the file GLASSFISH_HOME/lib/dtds/sun-web-app_2_5-0.dtd within your Glassfish install directory.
--
Wolfram Rittmeyer
[Message sent by forum member 'writtmeyer' (writtmeyer)]
http://forums.java.net/jive/thread.jspa?messageID=270167