Re: HTTP Status 405 - HTTP method GET is not supported by this URL



joshua wrote:
I have gotten this error now on tomcat6 and on resin3 with this

It makes the post a bit easier to read if you quote the error message in the text of your message as well as the subject line.

servlet. It's just a very simple servlet, inheriting
javax.servlet.http.HttpServlet. I can finally reach the servlet, but
am getting this error about the GET method, which is odd, because my
servlet uses doPost and NOT doGet!

Actually, your servlet most emphatically does use doGet(), any time it receives a GET message. You don't control that, because it's up to the client whether it sends a GET or a POST.

You don't provide a doGet() method. That means you are inheriting the implementation of doGet() from HttpServlet.
<http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServlet.html#doGet(javax.servlet.http.HttpServletRequest,%20javax.servlet.http.HttpServletResponse)>

--
Lew
.



Relevant Pages

  • Re: HTTP Status 405 - HTTP method GET is not supported by this URL
    ... It makes the post a bit easier to read if you quote the error message in the text of your message as well as the subject line. ... about the GET method, which is odd, because my servlet uses doPost and NOT doGet! ... Actually, your servlet most emphatically does use doGet(), any time it receives a GET message. ...
    (comp.lang.java.help)
  • Re: HTTP Status 405 - HTTP method GET is not supported by this URL
    ... It makes the post a bit easier to read if you quote the error message in the ... about the GET method, which is odd, because my servlet uses doPost and NOT doGet! ...
    (comp.lang.java.help)
  • Re: Stream in servlet object causing problems
    ... >> The doGet() can be called at the same time by multiple threads. ... Do not make your Servlet ... Webserver gets request from browser. ...
    (comp.lang.java.programmer)
  • Re: Stream in servlet object causing problems
    ... >> sends that socket's inputstream to the browser. ... >> every time someone triggers the doGet() method, or is this sorted out by ... >> the servlet container itself? ... >> public void doGet(HttpServletRequest request, ...
    (comp.lang.java.programmer)
  • Re: Stream in servlet object causing problems
    ... > sends that socket's inputstream to the browser. ... > every time someone triggers the doGet() method, or is this sorted out by ... > the servlet container itself? ... > public void doGet(HttpServletRequest request, ...
    (comp.lang.java.programmer)