java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

后端 未结 7 1766
执念已碎
执念已碎 2020-12-03 03:17

I have an old struts 1 app that has always been built using Ant, which I\'m converting to use Maven instead. The structure of my app is modular, with dependency management i

7条回答
  •  渐次进展
    2020-12-03 03:51

    I also lost a half of day trying to fix this.

    It appeared that root was my project pom.xml file with dependency:

        
            javax.servlet.jsp
            jsp-api
            2.1
            provided
        
    

    Other members of the team had no problems. At the end it appeared, that I got newer tomcat which has different version of jsp-api provided (in tomcat 7.0.60 and above it will be jsp-api 2.2).

    So in this case, options would be:

    a) installing different (older/newer) tomcat like (Exactly what I did, because team is on older version)
    b) changing dependency scope to 'compile'
    c) update whole project dependencies to the actual version of Tomcat/lib provided APIs
    d) put matching version of the jsp-api.jar in {tomcat folder}/lib
    

提交回复
热议问题