当我尝试通过link / del删除时出现错误。它给了我这个错误,如下所示:
Error: Not Found
The requested URL /del?eid=5769015641243648 was not found on this server.
我认为它与我的servlet映射或什么有关?
<servlet>
<servlet-name>CreateNewEvent</servlet-name>
<servlet-class>com.Norbu.EventsPortal.ServletCreateEvent</servlet-class>
</servlet>
<servlet>
<servlet-name>DeleteEvent</servlet-name>
<servlet-class>com.Norbu.EventsPortal.ServletDeleteEvent</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CreateNewEvent</servlet-name>
<url-pattern>/add</url-pattern>
</servlet-mapping>
<sevlet-mapping>
<servlet-name>DeleteEvent</servlet-name>
<url-pattern>/del/*</url-pattern>
</sevlet-mapping>
<welcome-file-list>
<welcome-file>EventsPortal.jsp</welcome-file>
</welcome-file-list>
这是我正在使用的删除链接代码:
<a href="/del?eid=<%=eventid%>">
这是日志文件中的警告消息
No handlers matched this URL.
有没有人可以帮助我解决我遇到的问题?
答案 0 :(得分:2)
检查拼写。你有sevlet-mapping