code: public void setContainer(Container container) {
  		this.container = container;
  
  		Map<String, TemplateEngine> map = new HashMap<String, TemplateEngine>();
  
  		// loading TemplateEngine class from DI Container.
  		Set<String> prefixes = container.getInstanceNames(TemplateEngine.class);
  		for (String prefix : prefixes) {
  			TemplateEngine engine = (TemplateEngine) container.getInstance(TemplateEngine.class, prefix);
  			map.put(prefix, engine);
  		}
  		this.templateEngines = Collections.unmodifiableMap(map);
  	}
docs: loading di container configulation from struts-plugin.xml , choise thymeleaf template engine.
  @param container Struts2Container