If Velocity is being use, the {{action-default.vm}] supplies some Velocitymacros that might be useful.
Code Block | ||
---|---|---|
| ||
#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 |