If Velocity is being use, the {{actionstruts-default.vm}] supplies some Velocitymacros VelocityMacros that might be useful.
Code Block |
---|
title | actionstruts-default.vm |
---|
|
#macro(bean $bean_name $name)
#set ($name = $action.bean($bean_name))
#end
#macro(includeservlet $name)
$action.include($name,$req,$res)
#end
#macro(url $name)
#set ($name = $action.bean("org.apache.struts.action2.util.URLBean"))
$name.setRequest($req)
$name.setResponse($res)
#end
#macro(property $object $property)
$!{ognl.findValue($property, $object)}
#end
|