Google app engine 此URL应用程序引擎不支持HTTP方法POST

Google app engine 此URL应用程序引擎不支持HTTP方法POST,google-app-engine,jsp,Google App Engine,Jsp,我不断得到以下错误: 此URL不支持HTTP方法POST 当尝试使用谷歌应用程序引擎在我的本地机器上构建时。 ShowJSPServlet.java文件中的代码: package helloJSP; import java.io.IOException; import javax.servlet.http.*; public class HelloJSPServlet extends HttpServlet { @Override public void doPost(H

我不断得到以下错误: 此URL不支持HTTP方法POST

当尝试使用谷歌应用程序引擎在我的本地机器上构建时。 ShowJSPServlet.java文件中的代码:

package helloJSP;

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

public class HelloJSPServlet  extends HttpServlet 
{
    @Override
    public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException 
    {
        resp.setContentType("text/html");
        resp.getWriter().println("Hello, world");
    }
}
我的web.xml文件是:

<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
    <servlet>
        <servlet-name>ShowJSP</servlet-name>
        <servlet-class>helloJSP.ShowJSPServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>ShowJSP</servlet-name>
        <url-pattern>/ShowName</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>hello.jsp</welcome-file>
    </welcome-file-list>
</web-app>

ShowJSP
helloJSP.ShowJSPServlet
ShowJSP
/秀名
hello.jsp
hello.jsp文件内容包括:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <body>
        <form id="mainform" method="post" action="/ShowName">
            <div>
                Name: <input id="url" type="text" size="100"/>
                <input type="submit" id="gobtn" value="Go" style="width: 70px"/>
            </div>
        </form>
    </body>
</html>

姓名:

这是我第一次使用JSP技术进行开发。我遗漏了什么?

web.xml中有一个问题:

    <servlet-class>helloJSP.ShowJSPServlet</servlet-class>
helloJSP.ShowJSPServlet
应该是

    <servlet-class>helloJSP.HelloJSPServlet</servlet-class>
helloJSP.hellojspervlet

这有帮助吗?

两件事。1) 如何调用Servlet?2)
公共类扩展HttpServlet
此处缺少类名。@HardikMishra 1)我已经给出了hello.jsp文件内容2)用类名更新了它,但仍然没有收到您的回复。让我试试