<?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>
<data-sources />
<form-beans>
<form-bean name="OtherActionForm" type="test.UserForm" />
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings>
<action
path="/Login*"
type="test.Login{1}"
name="{1}Form"
scope="request"
validate="false"
input="{1}">
<forward name="sucess" path="/sucess.jsp"/>
<forward name="fail" path="/fail.jsp"/>
</action>
</action-mappings>
<message-resources parameter="com.yourcompany.struts.ApplicationResources" />
</struts-config>
<!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>
<data-sources />
<form-beans>
<form-bean name="OtherActionForm" type="test.UserForm" />
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings>
<action
path="/Login*"
type="test.Login{1}"
name="{1}Form"
scope="request"
validate="false"
input="{1}">
<forward name="sucess" path="/sucess.jsp"/>
<forward name="fail" path="/fail.jsp"/>
</action>
</action-mappings>
<message-resources parameter="com.yourcompany.struts.ApplicationResources" />
</struts-config>
本文深入探讨了Struts框架的配置文件,包括数据源、表单bean、全局异常处理、全局转发规则、动作映射及资源消息配置,详细解析了如何实现用户登录逻辑。
1421

被折叠的 条评论
为什么被折叠?



