setChainedContexts(String contexts) allow users to specify via the struts.properties file a set of additional VelocityContexts to chain to the
the StrutsVelocityContext.
initializes the VelocityManager. this should be called during the initialization process, say by
ServletDispatcher. this may be called multiple times safely although calls beyond the first won't do anything
Parameters: context - the current servlet context
load optional velocity properties using the following loading strategy
relative to the servlet context path
relative to the WEB-INF directory
on the classpath
Parameters: context - the current ServletContext. may not be null the optional properties if struts.velocity.configfile was specified, an empty Properties file otherwise
Instantiates a new VelocityEngine.
The following is the default Velocity configuration
resource.loader = file, class
file.resource.loader.path = real path of webapp
class.resource.loader.description = Velocity Classpath Resource Loader
class.resource.loader.class = org.apache.struts2.views.velocity.StrutsResourceLoader
this default configuration can be overridden by specifying a struts.velocity.configfile property in the
struts.properties file. the specified config file will be searched for in the following order:
relative to the servlet context path
relative to the WEB-INF directory
on the classpath
Parameters: context - the current ServletContext. may not be null
constructs contexts for chaining on this request. This method does not
perform any initialization of the contexts. All that must be done in the
context itself.
Parameters: servletRequest - Parameters: servletResponse - Parameters: extraContext - an VelocityContext[] of contexts to chain
setChainedContexts
public void setChainedContexts(String contexts)(Code)
allow users to specify via the struts.properties file a set of additional VelocityContexts to chain to the
the StrutsVelocityContext. The intent is to allow these contexts to store helper objects that the ui
developer may want access to. Examples of reasonable VelocityContexts would be an IoCVelocityContext, a
SpringReferenceVelocityContext, and a ToolboxVelocityContext
setContainer
public void setContainer(Container container)(Code)