Jar file failed to load in tomcat webapps

前端 未结 4 1537
野趣味
野趣味 2021-01-31 09:33

This is what the error i got when i try to deploy maven project to tomcat

mvn tomcat7:deploy

Error :



        
4条回答
  •  眼角桃花
    2021-01-31 10:12

    INFO: validateJarFile(D:\Softwares\tomcat\apache-tomcat-7.0.50\webapps\myWebApp_ 1\WEB-INF\lib\javax.servlet-api-3.0.1.jar) - jar not loaded

    Servlet3.0 is already shipped with the tomcat inside its lib folder and by default tomcat will always load the servlet jar present there. Thats why you are getting the warning that tomcat is not loading your jar inside the project.

    Simple solution : If you are using maven, set its scope as provided inside the pom.xml and maven will not place it in the WEB-INF/lib of your project. Something like

    
        javax.servlet
        servlet-api
        3.0
        provided
    
    

提交回复
热议问题