zoukankan      html  css  js  c++  java
  • Struts的配置文件

    Struts的核心配置文件是struts.xml,Struts应用的的各组件及其关系均在该文件中声明

    struts.xml配置文件基本结构:

    <?xml version="1.0" encoding="UTF-8" ?>

    <!DOCTYPE struts PUBLIC
     "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
     "http://struts.apache.org/dtds/struts-2.1.dtd">

    <struts>
    <!--Bean配置-->

    <bean name="Bean的名字" class=“自定义的组件类”/>

    <!--常量配置-->

    <constant name="属性名" value="属性值"/>

    <!--导入配置文件-->

    <include file="文件名"/>

    <!--包配置-->

    <package name="包名称" namespace="/包的命名空间名" extends="structs-default">

    <!--对Action的配置,可以有多对-->

      <action name="名称" class="Action对应的类" method="Action中某方法名">

        <!--定义逻辑视图和物理资源之间的映射-->

        <result name="success">/page/hello.jsp</result>

      </action>
    </struts>  

  • 相关阅读:
    7.15 更改累计和中的值
    7.10 计算中间值
    7.11 求总和的百分比
    7.9 计算模式
    7.8 计算累计差
    7.4 求一个表的行数
    7.6 生成累计和
    7.7 生成累积乘积
    7.2 求某列中的最小、最大值
    7.3 对某列的值求和
  • 原文地址:https://www.cnblogs.com/lls1350767625/p/7816882.html
Copyright © 2011-2022 走看看