----- Original Message ----- From: "Nikola Milutinovic" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 04, 2001 3:18 PM Subject: Re: HTTP method POST is not supported by this URL
> Larry Isaacs wrote: > > > If you POST to a servlet which extends HttpServlet and that > > servlet doesn't override the doPost() method, the default > > doPost() method outputs this error message. > > Why? I thought that the default "doPost()" just calls "service()". I didn't have > to override anything in GenericServlet, so you could be right. > > Nix. >[...] YourServlet extends javax.servlet.http.HttpServlet, and javax.servlet.http.HttpServlet extends javax.servlet.GenericServlet, the following is from HttpServlet in jakarta-servletapi-4-src.zip in www.Apache.org: ... protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String protocol = req.getProtocol(); String msg = lStrings.getString("http.method_post_not_supported"); if (protocol.endsWith("1.1")) { resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, msg); } else { resp.sendError(HttpServletResponse.SC_BAD_REQUEST, msg); } } ... it doesn't response anything to the client, so you need to override it in YourServlet. Bo Dec.04, 2001 -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>