我正在学习 Apache Struts1。当我使用 DynaActionForm 时,在提交 '/login' 请求后,出现ClassNotFoundException
错误:找不到动作“com.wi.struts.UserAction”。我的文件“struts-config.xml”:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
<form-beans>
<form-bean name="UserForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="userName" type="java.lang.String"/>
<form-property name="passWord" type="java.lang.String"/>
</form-bean>
</form-beans>
<action-mappings>
<action path="/login" type="com.wi.struts.UserAction" name="UserForm" scope="session">
<forward name="loginIn" path="index.jsp"/>
</action>
</action-mappings>
</struts-config>