为什么在servlet中获取不到发起请求页面中设置的request的属性值?

发起请求页面:index.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
    <form action="Myservlet" method="post">
        <input type="submit">
    </form>
        <%request.setAttribute("name", "chenxuan"); %>
</body>
</html>

servlet:Myservlet.java

 package myservlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class Myservlet
 */
@WebServlet("/Myservlet")
public class Myservlet extends HttpServlet {
    private static final long serialVersionUID = 1L;

    public Myservlet() {
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
    }

    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        //获取index中request设置属性的值
        System.out.println("index中request中name的属性值:"+request.getAttribute("name"));
    }

}

request的作用域是一次请求中,上述代码的request是在一次请求中啊,为什么servlet中获取到的属性值是NULL?

运行结果