简体   繁体   English

JBoss 4.0.2 war部署中找不到WEB-INF / lib jar

[英]WEB-INF/lib jars not found in JBoss 4.0.2 war deploy

I have a simple web application (one jsp and one servlet) file that I've copied into jboss-4.0.2/server/default/deploy folder and it has successfully hot deployed as I can access the jsp page. 我有一个简单的Web应用程序(一个jsp和一个servlet)文件,已将其复制到jboss-4.0.2 / server / default / deploy文件夹中,并且由于可以访问jsp页面,因此已成功热部署。 However, when I invoke the servlet, I am getting a java.lan.NoClassDefFoundError. 但是,当我调用servlet时,我得到了一个java.lan.NoClassDefFoundError。

I suspect that the jars under the WEB-INF/lib directory within the war is not being picked up. 我怀疑战争中WEB-INF / lib目录下的jar没有被拾取。

The structure of my war is: 我的战争结构是:

META-INF  
  -->  MANIFEST.MF  
WEB-INF  
  -->  classes  
          --> ...*.classes  
  -->  lib  
          --> jcommon-1.0.16.jar  
              jfreechart-1.0.13.jar  
              servlet-api.jar  
index.jsp  

Anybody else have classloading issues in JBoss 4? 其他人在JBoss 4中有类加载问题吗?

Many thanks. 非常感谢。

At the very least, you should not have the servlet-api.jar file in there. 至少,您不应在其中包含servlet-api.jar文件。 Those classes should all be provided by the Servlet container (in your case, JBoss). 这些类都应由Servlet容器(在您的情况下为JBoss)提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM