这边文章是我记录调试JAVA程序的错误,每次遇到都会更新!
错误1.HTTP Status 405 - HTTP method GET is not supported by this URL
解决办法:删除super.doGet(request, response);
错误2.
HTTP Status 404 - /Simple/GetAddress
--------------------------------------------------------------------------------
type Status report
message /Simple/GetAddress
description The requested resource (/Simple/GetAddress) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.18
解决方法:
<welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list>这上面的代码不要删除掉啦!
还有一种情况就是servlet路径映射错误
<servlet> <servlet-name>cnServlet</servlet-name> <servlet-class>tbexpcom.yto.servlet.CommonServlet</servlet-class> <!-- <load-on-startup>1</load-on-startup> --> </servlet> <servlet-mapping> <servlet-name>cnServlet</servlet-name> <url-pattern>/servlet/CommonServlet</url-pattern> </servlet-mapping>
持续遇到问题,持续解决问题中!
原文地址:http://blog.csdn.net/tanzuai/article/details/45583583