2013-07-26 25 views
0

這裏是我的行動​​方法,我怎樣才能在JSP中獲取參數?

@Override 
public String execute() throws Exception { 

    ActionContext aContext = ActionContext.getContext();   
    aContext.getParameters().put("reqVar1", "reqVar1-Value"); 

    return SUCCESS; 
} 

我想在JSP參數值如下面的代碼,

<s:property value="#parameters.reqVar1" /> 

,但它不工作。

我看參數在堆棧方面:

enter image description here

我怎麼能拿在JSP參數值?

+2

你爲什麼這樣做呢?用getter和setter創建屬性並使用它。 –

+0

''應該是'' –

回答