Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContex


问题描述:

在idea中maven构建web项目,启动Tomcat插件时,出现Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContex

问题分析:

Tomcat本身中已存在servlet-api.jar、jsp-api.jar、jstl.jar,因此在maven中的pom.xml文件中,应该标明着三个包<scope></scope>标签为provide,因为provided表明该包只在编译和测试的时候用.运行时就不用了。

问题解决:

<dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>${jstl.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
            <version>${jsp.version}</version>
            <scope>provided</scope>
        </dependency>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM