zoukankan      html  css  js  c++  java
  • Java教程 实例学习Struts

    <!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> 
     
  • 相关阅读:
    Spring bean的自动装配
    JSP三大指令
    JSP九大内置对象
    Java异常的捕获顺序(多个catch)
    Integer.parseInt(s)和Integer.valueOf(s)之间的区别
    mysql忘记密码(MySQL5.7)
    java的四种内部类
    内存泄露查询
    深度优先和广度优先比较
    循环队列
  • 原文地址:https://www.cnblogs.com/encounter/p/2189252.html
Copyright © 2011-2022 走看看