Class SingletonVelocityManager
java.lang.Object
com.atlassian.confluence.setup.struts.SingletonVelocityManager
- All Implemented Interfaces:
- org.apache.struts2.views.velocity.VelocityManager
public class SingletonVelocityManager
extends Object
implements org.apache.struts2.views.velocity.VelocityManager
Struts uses a Guice container to manage its beans, the VelocityManager being one of them. Currently, the container
 and Struts package configuration are coupled. That is, there is no way to reload the package configuration without
 also reloading the container.
 
 Confluence requires the Struts package configuration to be reloaded when plugins are installed and uninstalled. This
 is problematic as the VelocityManager and its configuration should remain constant during the Confluence application
 lifecycle. This delegating VelocityManager addresses this issue. See struts.velocity.manager.classname in
 struts.xml.
- Since:
- 8.8
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.velocity.context.ContextcreateContext(org.apache.struts2.util.ValueStack stack, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) org.apache.velocity.app.VelocityEnginevoidinit(jakarta.servlet.ServletContext context) 
- 
Constructor Details- 
SingletonVelocityManagerpublic SingletonVelocityManager()
 
- 
- 
Method Details- 
getVelocityEnginepublic org.apache.velocity.app.VelocityEngine getVelocityEngine()- Specified by:
- getVelocityEnginein interface- org.apache.struts2.views.velocity.VelocityManager
 
- 
createContextpublic org.apache.velocity.context.Context createContext(org.apache.struts2.util.ValueStack stack, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) - Specified by:
- createContextin interface- org.apache.struts2.views.velocity.VelocityManager
 
- 
initpublic void init(jakarta.servlet.ServletContext context) - Specified by:
- initin interface- org.apache.struts2.views.velocity.VelocityManager
 
 
-