JavaWeb--环境搭建(idea,tomcat)到跑测试中我犯下的滔天大罪

发布时间 2023-07-25 10:29:46作者: 唯枫荻相伴

1.在网上copy时路径没有写对

点击查看代码
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">
    <servlet>
        <!--      LoginServlet的路径-->
        <servlet-name>LoginServlet</servlet-name>
        <servlet-class>com.demo.servlet.RegisterServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <!--    设置/login这个页面来向LoginServlet发送请求(写错)-->
        <servlet-name>LoginServlet</servlet-name>
        <url-pattern>/LoginServlet</url-pattern>
    </servlet-mapping>
</web-app>

2.connector匹配错误

3.maven未引入

4.pom.xml配置未做完(小问题)

5.最严重的,此处多打了一个回车,找了几百年才找到怎么个事