直接使用href=action即可:
無參數:
<a href=getJournals>日誌</a>
有參數:
<a href="getJournals?id=33&title=ttt">日誌</a>
所跳轉頁面可在struts.xml中配置:
<action name="getJournals" class="com.flowers.with.controler.Journals" method="obtainJournals">
<result name="success">/WithView/journals.jsp</result>
</action>
另:
有參數需在action調用方法中增加:
private int id;
private String title;
並添加getters和setters方法。