更改配置:
D:\DevelopTool\jboss-4.2.2.GA\server\default\deploy\jboss-web.deployer\META-INF下的
jboss-service.xml下找到
<attribute name="UseJBossWebLoader">false</attribute> <!-- The list of package prefixes that should not be loaded without delegating to the parent class loader before trying the web app class loader. The packages listed here are those tha are used by the web container implementation and cannot be overriden. The format is a comma separated list of the package names. There cannot be any whitespace between the package prefixes. This setting only applies when UseJBossWebLoader=false. -->将其改为true。就是对于web应用的类库也用jboss来加载,而不是有tomcat来加载。