http status 404 错误,急救!!!help
输入 http://localhost:8888/GP 可以看到文件列表,点webroot进入后可以打开index.jsp页面,但是如果直接输入http://localhost:8888/GP/Login1001_Init.do,则会报404错误,如下:
HTTP Status 404 - /GP/Login1001_Init.do
type Status report
message /GP/Login1001_Init.do
description The requested resource (/GP/Login1001_Init.do) is not available.
Apache Tomcat/6.0.18
配置文件如下:
web.xml:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>
WEB-INF/config/login-struts-config.xml
</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
login-struts-config.xml:
<form-beans>
<form-bean name="Login1001Form" type="com.granduateproject.login.form.Login1001Form" />
</form-beans>
<action-mappings>
<action path="/Login1001_Init"
type="com.granduateproject.login.action.Login1001Action"
parameter="Init"
name="Login1001Form"
scope="request">
<forward name="Default" path="/jsp/login/login.jsp" />
</action>
</action-mappings>
</struts-config>
tomcat使用的是自动部署