我在 web.xml 中以这种方式映射了我的 servlet:
<servlet>
<servlet-name>home</servlet-name>
<servlet-class>servlet.HomeServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>home</servlet-name>
<url-pattern>/HomeServlet</url-pattern>
</servlet-mapping>
我试图称之为:
<a href="/HomeServlet" class="brand"><img alt="logo" src="img/Logo2.png"></a>
但是当我点击链接时,我得到了这个错误
HTTP Status 404 - /HomeServlet
type Status report
message /HomeServlet
description The requested resource (/HomeServlet) is not available.
怎么了?