Java教程 实例学习Struts

java

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

<struts-config>
<form-beans>
<form-bean name="logonForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
</form-beans>

<global-forwards>
<forward name="success" path="/main.jsp"/>
<forward name="logoff" path="/logoff.do"/>
</global-forwards>

<action-mappings>
<action path="/logon"
type="org.monotonous.struts.LogonAction"
name="logonForm"
scope="session"
input="logon">
</action>

<action path="/logoff"
type="org.monotonous.struts.LogoffAction">
<forward name="success" path="/index.jsp"/>
</action>
</action-mappings>

<controller>
<!-- The "input" parameter on "action" elements is the name of a
local or global "forward" rather than a module-relative path -->
<set-property property="inputForward" value="true"/>
</controller>

<message-resources parameter="org.monotonous.struts.ApplicationResources"/>
</struts-config> 
 

以上是 Java教程 实例学习Struts 的全部内容, 来源链接: utcz.com/z/392884.html

回到顶部