Выводит Hello вместо Hello World
<?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>
<servlet-name>MainServlet</servlet-name>
<servlet-class>web.ru.andreevda.greatOcean.MainServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MainServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
@WebServlet(name = "MainServlet", urlPatterns = "/index")
public class MainServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException{
String name = "World";
request.setAttribute("name", name);
request.getServletContext().getRequestDispatcher("WEB-INF/index.jsp").forward(request,response);
}
}
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
Hello ${name}
</body>
</html>