`
wxb880114
  • 浏览: 681871 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

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

阅读更多
出现错误的原因:
  1,继承HttpServlet的Servlet没有覆写对应请求和响应的处理方法即:doGet或
      doPost等方法;默认调用了父类的doGet或doPost等方法;
  2, 父类HttpServlet的doGet()或doPost()方法覆盖了你重写的doGet或doPost等
      方法;
      只要出现以上的情况之一,父类HttpServlet的doGet或doPost等方法的默认实现是
      返回状态代码为405的HTTP错误表示:对于指定资源的请求方法不被允许。
解决方法:
  1,子类覆写父类的doGet或doPost等方法;
  2,在你的Servlert中覆写doGet或doPost等方法来处理请求和响应,不要调用父类
     HttpServlet的doGet() 和 doPost()方法,即:
     将doGet()方法中的 super.doGet(req, resp);
             改为:this.doPost(req , resp) ; 可以解决问题。
转载:原文http://qingtianzhu.iteye.com/blog/732041
分享到:
评论

相关推荐

    Http-servlet请求源码

    本文将深入探讨HTTP Servlet请求的源码实现,并针对"HTTP method GET is not supported by this URL"这一常见错误进行分析和解决。 首先,让我们理解HTTP Servlet的工作原理。每当一个HTTP请求到达Web服务器时,...

    servlet2.4doc

    Encodes the specified URL for use in the sendRedirect method or, if encoding is not needed, returns the URL unchanged. encodeUrl(String) - Method in class javax.servlet....

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    is written to stream, which is then read by the flex-property, for which the Assign method is called. - ADD: In TIdPool (module FlexUtils), added the method NextUsed (allows iterating all taken ...

    http status

    - **405 Method Not Allowed**:请求方法不被允许。 - **406 Not Acceptable**:服务器无法以请求者希望的格式提供数据。 - **407 Proxy Authentication Required**:此状态码类似于401,但请求者必须通过代理服务器...

    Bochs - The cross platform IA-32 (x86) emulator

    - new hdimage method get_capabilities() that can return special flags - vmware3, vmware4 and vvfat classes now return HDIMAGE_HAS_GEOMETRY flag - other disk image modes by default return HDIMAGE_...

    Feign发送Get请求时,采用POJO对象传递参数的最终解决方案.docx

    {"timestamp":1482676142940,"status":405,"error":"MethodNotAllowed","exception":"org.springframework.web.HttpRequestMethodNotSupportedException","message":"Request method 'POST' not supported","path":...

    acpi控制笔记本风扇转速

    This improves overall interpreter performance by ~25%, reduces code size, and reduces CPU stack use. (Valery Podrezov + interpreter changes in version 20051202 that eliminated namespace loading during...

    BURNINTEST--硬件检测工具

    This will error faulty NICs that are not detected by the BurnInTest auto NIC detection mechanism. - Minor change to the 2D memory test when run with the 3D test (multiple large windows) and the ...

    计算机网络第六版答案

    This document contains the solutions to review questions and problems for the 5th edition of Computer Networking: A Top-Down Approach by Jim Kurose and Keith Ross. These solutions are being made ...

    php.ini-development

    documents, however this remains supported for backward compatibility reasons. ; Note that this directive does not control the , which can be ; used regardless of this directive. ; Default Value: On ;...

    Sakemail

    ).- Added the property FileStream to the class TAtachedFile and the procedure SaveToStream, this was done by Brian Sheperd- The address separator (in the TO: field) is ‘,‘ and ‘;‘ now (before it ...

    JSP Simple Examples

    In this program we are going to know how the server determines whether the password entered by the user is correct or not. This whole process is controlled on the server side. Multiple forms in jsp ...

    8-07-14_MegaCLI for linux_windows

    SCGCQ00521386 (DFCT) - Megacli : ADRA is still mentioned in help file, eventhough it is not supported SCGCQ00572235 (DFCT) - No description for "setdelay" with help file of adppr. SCGCQ00572270 (DFCT)...

    各类Http请求状态(status)及其含义详细解析

    - 405 - Method Not Allowed:请求的方法不被允许,如对不允许POST的URL使用POST方法。 - 406 - Not Acceptable:服务器无法提供满足客户端Accept头的响应。 - 408 - Request Timeout:服务器等待客户端请求超时。 -...

    HTTP & FTP 返回值大全

    - **405 Method Not Allowed**: 请求行中指定的方法不允许用于请求相应的资源。 - **406 Not Acceptable**: 资源当前无法生成与请求的Accept头字段相匹配的响应。 - **407 Proxy Authentication Required**: 由代理...

    Tomcat服务器报错对应值解析

    - **405 Method Not Allowed**: 请求行中指定的方法不被允许。 - **406 Not Acceptable**: 服务器无法根据客户端可接受的内容特性及MIME类型,返回合适的实体内容。 - **407 Proxy Authentication Required**: 与401...

    IRPTrace2.00.002.zip

    PAE mode is used by Windows 2000/XP/Server 2003 in order to support more then 4GB of physical memory. Release 1.00.003 1. BSOD at dumping memory block containing '%' characters was fixed. 2. ...

    EurekaLog_7.5.0.0_Enterprise

    Later is supported when map2dbg.exe tool is placed in \Bin folder of EurekaLog installation (separate download is required) 5)....Added: Exception2HRESULT in EAppDLL to simplify developing DLLs with ...

    XMLHttpRequest

    - **405 Method Not Allowed**:请求的方法(如GET、POST等)不被允许用于该资源。 - **406 Not Acceptable**:客户端请求的资源无法提供符合其Accept头部所定义的格式。 - **407 Proxy Authentication Required**:...

Global site tag (gtag.js) - Google Analytics