@PostConstruct private void initToolManager() throws IllegalStateException, IOException { LOGGER.debug("Configuring toolbox from {}", getToolboxConfigLocation()); velocityToolManager = new ViewToolManager(getServletContext(), false, true); velocityToolManager.setVelocityEngine(getVelocityEngine()); FileFactoryConfiguration factoryConfig = new XmlFactoryConfiguration(false); factoryConfig.read(new ServletContextResource(getServletContext(), getToolboxConfigLocation()).getURL()); velocityToolManager.configure(factoryConfig); }
@Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); XmlFactoryConfiguration config = new XmlFactoryConfiguration(); config.read(getServletContext().getResourceAsStream(getToolboxConfigLocation())); toolManager = new ViewToolManager(getServletContext(), false, false); toolManager.configure(config); toolManager.setVelocityEngine(getVelocityEngine()); }
public ViewToolManager getToolManager() { return getOrBuildToolManager(); }
/** * Returns the shared tool manger * * @return the manager */ private ViewToolManager getToolManager() { return WebServiceLocator.instance().getService(VelocityTemplateManager.class) .getToolManager(); }