在 freemark 的頁面要嵌入 action 及 參數( Parameters) 有兩種方式

1. 使用 struts2 tag: action

<img width='100px' src='
    <@s.action name="Picout" executeResult="success">  
           <@s.param name="name">${Session.userInfo['PHOTO_PATH']}</@s.param>  
    </@s.action>  
'/>

 

2. 使用 struts2 tag: url

<img width='100px' src='<@s.url action="Picout"><@s.param name="name">${Session.userInfo['PHOTO_PATH']}</@s.param></@s.url>' />

 

個人建議使用第2種方法較為方便

參考: http://www.mkyong.com/struts2/struts-2-url-tag-example/

struts2:在freemarker頁面取得 Application Cookie Request Session parameter

arrow
arrow
    文章標籤
    freemark struts2 action
    全站熱搜

    MIS 發表在 痞客邦 留言(0) 人氣()