多struts-config的问题~!!!
我用的是eclipse3.1+myeclipse4.1
我的web.xml中配置了多个struts-config.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/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/main</param-name>
<param-value>/WEB-INF/main/struts-config.xml</param-value>
</init-param>
............
</servlet>
-----------------------------------
我在 main下的struts-config.xml中写了个action
<form-bean name="RegisterForm" type="com.hdtq.main.RegisterForm">
</form-bean>
......
<action path="/add" type="com.hdtq.main.RegisterAction" name="RegisterForm" scope="request" input="register.jsp" validate="false">
<forward name="success" path="/success.jsp"></forward>
<forward name="failure" path="/failure.jsp"></forward>
</action>
------------------------------------
main/register.jsp
------------------------------------
<html:form action="add.do">
<table border="0">
<tr>
<td>Login:</td>
<td><html:text property="username"/></td>
</tr>
<tr>
<td>Password1:</td>
<td><html:password property="password1" /></td>
</tr>
<tr>
<td>Password2:</td>
<td><html:password property="password2" /></td>
</tr>
<tr>
<td colspan="2" align="center"><html:submit value="Register" /></td>
</tr>
</table>
</html:form>
--------------------------------------------
当访问 main/register.jsp的时候 报错...
Cannot retrieve mapping for action /add
................
哪位大侠帮我看看是怎么回事~!
在struts的例子中 都是这么做的啊 我都快哭了.............