我已将eclipse导出的WAR文件复制到tomcat的Webapp目录中,然后我重写了这样的web.xml文件:
<?xml version="1.0" encoding="utf-8"?>
<!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>MMP</display-name>
<description>
</description>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>SignInValidment</servlet-name>
<description>This servlet plays the controller of the Placement Test proccess
</description>
<servlet-class>SignInValidment</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>SignInValidment</servlet-name>
<url-pattern>/SignInValidment</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout> <!-- 30 minutes -->
</session-config>
</web-app>
问题是,当程序试图访问SignInValidment Servlet以验证登录事件时,Tomcat返回404错误,即/ MMP / SignInValidment /未找到,然后我甚至无法访问项目的根目录( jsp文件)它不断给我这个错误:&#34; HTTP状态404 - &#34;
我使用的是tomcat 8.0版,请注意我的计算机有点感染病毒和有害程序。 我真的遇到了紧急问题,请帮我管理这个项目。