希望这里有乐于助人的高手,指点一下啊
我按照网上的套路,已经运行成功了一个servlet的例子,但是再运行其他的又出错了,
第一个例子的web.xml
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>My Web Application</display-name>
<description>
A application for test.
</description>
<servlet>
<servlet-name>HTTPGetServlet</servlet-name>
<servlet-class>HTTPGetServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HTTPGetServlet</servlet-name>
<url-pattern>/HTTPGetServlet</url-pattern>
</servlet-mapping>
</web-app>
这个运行成功了,我把另外一个.class放在相同文件夹下,但是不知道应该怎么写web.xml
我将另外一个.class拷贝到Tomcat 5.5\webapps\myapp\WEB-INF\classes下,并且把web.xml中的servlet名都改了,但是出错:
HTTP Status 405 - HTTP method GET is not supported by this URL
type Status report
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).
Apache Tomcat/5.5.17
谁能指点一下啊,谢谢