我将另外一个.class拷贝到Tomcat 5.5\webapps\myapp\WEB-INF\classes下,并且把web.xml中的servlet名都改了,但是出错: HTTP Status 405 - HTTP method GET is not supported by this URLtype Status reportmessage HTTP method GET is not supported by this URLdescription 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谁能指点一下啊,谢谢
自动生成一个Servlet,然后看看web.xml怎么写的就知道了
至少你把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
HTTP Status 405 - HTTP method GET is not supported by this URLtype Status reportmessage HTTP method GET is not supported by this URLdescription 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谁能指点一下啊,谢谢