struts1的问题,急急急!
巴巴运动网项目
struts1.3 tomcat7.0 jdk7.0
浏览器访问:http://localhost:8000/user/reg.do?method=regUI 提示404错误,tomcat那边一点错误提示都没有,只有一个警告不知道有没有关系
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:shop_01' did not find a matching property.
调试了一下,感觉web.xml跳到struts-config.xml的时候好像出问题了,因为struts-config.xml的配置文件里面的传递参数我怎么改都没有错误提示,比如form-bean的name跟action的name改成不一致也不给提示报错。
整了一个下午也没个结果,急死俺了,哪位哥帮忙看下是哪里出问题了。
关键代码如下:
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:beans.xml</param-value>
</context-param>
<!-- 对Spring容器进行实例化 -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>struts</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>struts</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
</web-app>
struts-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
<form-beans>
<form-bean name="buyerForm" type="cn.itcast.web.formbean.user.BuyerForm"></form-bean>
</form-beans>