Eclipseを使用してローカルのTomcatでサーブレットを実行しようとしています。HTTPステータス404 - Tomcatを使用するEclipseの場合
しかし、私はこのエラーが発生しており、何が違うのか分からない。
私は実際にそれをここに記録:http://www.screenr.com/ZyD8
感謝を!
はまた、私はこれまでのweb.xmlを変更:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID"
version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" >
<display-name>
TEST3
</display-name>
<welcome-file-list>
<welcome-file>
TEST3
</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>
helloServlet
</servlet-name>
<servlet-class>
HelloServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
helloServlet
</servlet-name>
<url-pattern>
/hello
</url-pattern>
</servlet-mapping>
</web-app>
パッケージを持つServletはありますか?そうであれば、web.xmlに完全修飾クラス名を書き込んでください。 –
"default package"です。しかし、私がパッケージ "test.servlet"で作成し、 "test.servlet.HelloServlet"をweb.xmlのクラス名として入れても、同じエラーが返されます。 – user387184
私の答えをチェックしてください。 –