I'm doing a web application (JSP) with eclipse with the google app engine plugin and it throws me an error when I press the send button:
"Error 405 HTTP method POST is not supported by this URL"
I've tried with "get" and if it works, but in this case I'm interested in doing it with post. Any solution?
JSP Code: Hello App Engine
<body>
<form action="/hello" method="post">
<input type="text" name="name"/>
<input type="submit" value="Enviar">
</form>
</body>
</html>
Servlet Code
public class HelloAppEngine extends HttpServlet {
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException {
response.setContentType("text/plain");
response.setCharacterEncoding("UTF-8");
String name = request.getParameter("name");
response.getWriter().print("hola " + name + "\r\n");