`

Parameterizable

阅读更多

import com.opensymphony.xwork2.config.entities.Parameterizable;

public class StaticParamsAction extends ActionSupport implements Parameterizable{

                                    //staticParams
 private Map map;        //把<param> xml文件中静态的值添加到map中必须实现Parameterizable接口

 public String execute(){
     System.out.println(this.map.size());
     return SUCCESS;
 }

 

 public void addParam(String name, String value) {
      this.map.put(name, value);
 }

 

 public Map<String, String> getParams() {
          return map;
 }

 

 public void setParams(Map<String, String> map) {
               this.map=map;
               System.out.println("set Map<>:        ----");
 }
}

 

<action name="staticParams" class="struts.action.StaticParamsAction">
          <interceptor-ref name="staticParams"/>
                    <param name="one">1</param>
                    <param name="two">2</param>
                    <param name="three">3</param>
          <result>index.jsp</result>
         </action>

分享到:
评论

相关推荐

    Multi-column deep neural network for traffic sign classification

    fast, fully parameterizable GPU implementation of a Deep Neural Network (DNN) that does not require careful design of pre-wired feature extractors, which are rather learned in a supervised way. ...

    cpp_TestDeepReLu.tar_community_ai_

    描述中提到"C++ DNN fully parameterizable Visual Studio 2017 community edition windows",这告诉我们项目的具体细节。首先,项目是用C++语言编写的,这是一种系统级编程语言,适合开发高性能的计算密集型应用,...

    MIME检测PHP库.zip

    class Mime implements Zformat\Parameterizable {  const STRUCTURE_MEDIA_TYPE = 0;  const STRUCTURE_EXTENSION = 1;  const MIME_MEDIA = 0;  const MIME_TYPE = 1;  private $_...

    LatticeECP3MemoryUsageGuide

    2. 通过PMI(Parameterizable Module Inference,可参数化模块推断):对于经验丰富的用户,可以跳过图形界面,直接使用ispLEVER Project Navigator中的可配置内存原语。在Verilog或VHDL中需要设置的参数和控制信号...

    lms滤波器matlab代码-Parameterizable-LMS-Adaptive-filter-DSP-IP-core:8/16/32位

    lms滤波器matlab代码可参数化的LMS自适应滤波器DSP IP核 该项目基于FPGA / DSP。 该项目的主要目的是设计LMS滤波器算法以及FIR滤波器,其权重适应环境噪声,从而为每个权重的每个更新值生成一个误差信号。...

    3204数据手册

    is a flexible, low-power, low-voltage stereo audio codec with programmable inputs and outputs, PowerTune capabilities, fixed predefined and parameterizable signal-processing blocks, integrated PLL, ...

    3204 datasheet

    3204 codec datasheet The TLV320AIC3204 ...· Programmable Microphone Bias parameterizable signal processing blocks, integrated · Programmable PLL PLL, integrated LDOs and flexible digital interfaces.

Global site tag (gtag.js) - Google Analytics