Error with Jboss while deploying a jsp/servlet web app “com.sun.faces.config.ConfigureListener” Error

前端 未结 2 1702
说谎
说谎 2021-01-22 13:10

I am working on JSP/Servlets. The web app is to be deployed on Jboss 6.

I am using Java 1.6, Eclipse and Maven2. I do not refer to JSF anywhere in my code.

My pr

2条回答
  •  离开以前
    2021-01-22 13:55

    I've experienced the same problem. To resolve it I've replace in pom.xml :

        
            javax
            javaee-api
             6.0
            jar
            compile
        
    

    by :

        
            javax
            javaee-api
            6.0
            provided
        
    

    According to maven doc you should set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes.

    provided is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive.

提交回复
热议问题