Tomcat v8.0服务器无法启动

时间:2019-01-14 15:37:43

标签: java eclipse tomcat web server

我正在尝试为最终的uni项目制作一个在Eclipse-ee的apache tomcat v8.0服务器上运行的动态Web应用程序,并且无法启动服务器。它一直运行良好,然后似乎无故停止。我是整个Web应用程序的新手,所以如果我做过任何愚蠢的事,请提前道歉!

这是尝试启动服务器时收到的错误消息:

Error message when starting server

这是服务器概述选项卡: Server overview

这是我尝试启动服务器时的控制台输出。有一些错误,但我不明白它们的含义:

<!-- THIS IS THE ENFORCER PLUGIN FOR MAVEN enforcer:enforce GOAL -->
        <!-- SPECIFIC GOALS VS LIFECYCLE GOALS MUST HAVE THE EXECUTION ID default-cli -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>1.4.1</version>
            <executions>
                <execution>
                    <id>default-cli</id>
                    <goals>
                        <goal>enforce</goal>
                    </goals>
                    <configuration>
                        <rules>
                            <DependencyConvergence/>
                            <bannedDependencies>
                                <searchTransitive>true</searchTransitive>
                                <excludes>
                                    <exclude>log4j:log4j</exclude>
                                </excludes>
                            </bannedDependencies>
                        </rules>
                        <fail>true</fail>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <!-- THIS IS THE ENFORCER PLUGIN FOR MAVEN VALIDATION GOAL BUILDS -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>1.4.1</version>
            <executions>
                <execution>
                    <id>enforce-banned-dependencies</id>
                    <goals>
                        <goal>enforce</goal>
                    </goals>
                    <configuration>
                        <rules>
                            <DependencyConvergence/>
                            <bannedDependencies>
                                <searchTransitive>true</searchTransitive>
                                <!-- Excludes are a list of includes that must NEVER be used -->
                                <!-- BOTH explicity and implicitly - They are completely forbidden -->
                                <excludes>
                                    <exclude>log4j:log4j</exclude>
                               </excludes>
                            </bannedDependencies>
                        </rules>
                        <fail>true</fail>
                    </configuration>
                </execution>
            </executions>
        </plugin>

最后是web.xml文件。我让它保持不变,所以我希望这很好: web.xml file

2 个答案:

答案 0 :(得分:3)

我相信这是问题所在

  

由于:java.lang.IllegalArgumentException:名为的servlet   [LoginCheck]和[Registration]都映射到url-pattern   [/ LoginCheck]不允许

将servlet更改为具有2个单独的路径。

答案 1 :(得分:1)

您有多个servlet映射到同一URL:

Caused by: java.lang.IllegalArgumentException: The servlets named [LoginCheck] and [Registration] are both mapped to the url-pattern [/LoginCheck] which is not permitted

可能是复制粘贴错误,可能您应该更改Registration的URL