关于eclipse 下运行servlet 的问题?

redline2005 2005-04-28 11:20:48
message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).


大家帮忙看看是什么原因?
...全文
106 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
redline2005 2005-04-28
  • 打赏
  • 举报
回复
呵呵 解决了
莫名其妙的问题
谢谢 了
redline2005 2005-04-28
  • 打赏
  • 举报
回复
我只写了一个 doGet()
protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1)
throws ServletException, IOException {
// TODO 自动生成方法存根
PrintWriter out=arg1.getWriter();
out.print("HELLO tomcat!");
}
部分代码是这样的,请高手看看是怎么回事呀
since2006 2005-04-28
  • 打赏
  • 举报
回复
你有可能只写了 doPost(); 而没写doGet()方法。。

打开页面时,默认为get

58,441

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧