◎筱米加步枪◎.Blog

Happy coding

Could not find template in cache 错误的解决方法

筱米加步枪 posted @ 2010年11月07日 02:51 in [ 开源框架 ] with tags struts , 10552 阅读

今天,做Strust2的东东,启动发现报如下错误:

Could not find template in cache, creating new one的错误

百度之得解决方法,可以在Action的地方写入如下代码:(我是在BaseAction中的构造函数写入)

	public BaseAction(){
		try {
			freemarker.log.Logger.selectLoggerLibrary(freemarker.log.Logger.LIBRARY_NONE);
			logger.debug("加载[freemarker]成功");
		} catch (ClassNotFoundException e) {
			logger.error("未找到类",e);
		}
	}

而后问题就消失了..


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter