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>
上一篇:无法运行scala


下一篇:How are you to imagine anything if the images are always provided for you?