The server encountered an internal error () that prevented it from fulfilling this request. --解决办法

前言

最近在学习maven, 然后用maven创建了一个web项目, 并用Tomcat启动项目,结果就出现了如下图的错误在这里插入图片描述

解决办法

错误的意思大概就是内部入到错误,无法完成请求,他说是内部,然后再去看一看idea控制台有什么信息(如下图)
在这里插入图片描述控制台上提示是用的Tomcat6启动的项目,我们用Tomcat:run启动项目时,默认的就是Tomcat6启动,可是我用下载的Tomcat7,这时候就要在pom.xml文件中添加Tomcat7的依赖

                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>2.2</version>
                    <configuration>
                        <port>8888</port>
                    </configuration>
                </plugin>

此时我们使用Tomact7:run就可以启动项目了!

发布了141 篇原创文章 · 获赞 206 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/ywq1016243402/article/details/94137392