html跳转Servlet一直404,尝试多个办法无解

遇到问题:html跳转Servlet显示404
html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>titletitle>
    <link rel="stylesheet" type="text/css" href="style.css">
head>
<body>
      <section>
                   <div>
                         <form action="Main_LoginServlet" method="post">
                                    <p>
                                        <button type="submit">登录button>
                                    p>
                              form>
                  div>
      section>
body>
html>

package main_Login;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(name = "Main_LoginServlet", urlPatterns = "/Main_LoginServlet")
public class Main_LoginServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        PrintWriter out=response.getWriter();
        out.println("a");
//        RequestDispatcher requestDispatcher=request.getRequestDispatcher("/main_Login.html");
//        requestDispatcher.forward(request,response);
    }
}

运行结果及报错内容

html可以打开,但是Servlet打不开

img

img

我的解答思路和尝试过的方法

img

①web.xml文件有修改过


<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>
        <servlet-name>Main_LoginServletservlet-name>
        <servlet-class>main_Login.Main_LoginServletservlet-class>
    servlet>
    <servlet-mapping>
        <servlet-name>Main_LoginServletservlet-name>
        <url-pattern>/Main_LoginServleturl-pattern>
    servlet-mapping>
web-app>

②tomcat也懵懵懂懂试过

img

img

③相对路径改绝对路径也试过

img

我想要达到的结果

能够正常让Servlet运行

回复错位置了 看一楼的评论