有不少人想访问主页(JSP页面)时,就加载action的数据,网上许多方法都能实现,这里就说一种比较简单的使用struts2标签的<s:action>方法
以下是action标签的属性
id | Deprecated. Use 'var' instead |
name | Name of the action to be executed (without the extension suffix eg. .action) |
namespace | Namespace for action to call |
flush | Whether the writer should be flush upon end of action component tag, default to true |
var | Name used to reference the value pushed into the Value Stack |
executeResult | Whether the result of this action (probably a view) should be executed/rendered |
ignoreContextParams | Whether the request parameters are to be included when the action is invoked |
rethrowException | Whether an exception should be rethrown, if the target |