Is there a method to specify the class loading order in WEB-INF directory? I am using JBoss 5.1.0. For example, I want to load WEB-INF/classes before a jar in WEB-INF/lib. Is this possible?
That's already mandated by the servlet spec (section SRV.9.5.1):
The Web application class loader must load classes from the WEB-INF/classes directory first, and then from library JARs in the WEB-INF/lib directory.