Template template/*/form-close.ftl not found. - Class: freemarker.template.Configuration
2014-02-19 19:00
495 查看
错误截图:
我查找了自己的配置文件,正确,没有问题!后来才发现,自己在Action中某个方法里,往session中设置了“theme”的值为“gray”.(本来我想用“theme”来定义我自己的主题,没想到和Struts2的主题设置冲突了)
注意:struts2可以通过多个途径获取"theme",包括:标签、page、request、session、application、struts.xml等,所以请谨慎使用“theme”关键字;
解决方法:
不用“theme”,用其他的关键字代替;
原因:
为struts2 主题配置了一个错误的值,如上图中,struts2是不存在这个gray这个主题的。我查找了自己的配置文件,正确,没有问题!后来才发现,自己在Action中某个方法里,往session中设置了“theme”的值为“gray”.(本来我想用“theme”来定义我自己的主题,没想到和Struts2的主题设置冲突了)
注意:struts2可以通过多个途径获取"theme",包括:标签、page、request、session、application、struts.xml等,所以请谨慎使用“theme”关键字;
解决方法:
不用“theme”,用其他的关键字代替;
相关文章推荐
- java.lang.ClassNotFoundException: org.springframework.ui.freemarker.FreeMarkerConfigurationFactory
- Spring MVC:ClassNotFoundException: freemarker.template.TemplateHashModelEx
- java.io.FileNotFoundException: Template /template/true/form.ftl not found.
- java.lang.ClassNotFoundException: org.eclipse.jetty.plus.webapp.EnvConfiguration
- theme="ajax" : Template /template/ajax/head.ftl not found异常解决
- Freemarker中Configuration的setClassForTemplateLoading方法参数问题
- 整合Struts2+SiteMesh+Spring+MyFaces(JSF)+Freemarker的时候启动服务器报错ClassNotFoundException: org.apache.struts2.sitemesh.FreeMarkerPageFilter
- 在struts2中整合ajax时出现Template /template/ajax/head.ftl not found错误时的处理方法
- spring-boot java.lang.ClassNotFoundException: org.thymeleaf.spring5.ISpringTemplateEngine
- java.io.FileNotFoundException: Template /template/ajax/head.ftl not found.
- Template /template/ajax/head.ftl not found.
- 安装sqoop-1.99.7报caused by java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration
- Template /template/pimple/a.ftl not found
- Spring Boot 踩坑之路之 Configuration Annotation Proessor not found in classpath
- java.lang.ClassNotFoundException: org.apache.commons.configuration.Configuration
- Freemarker中Configuration的setClassForTemplateLoading方法参数问题
- Spring Boot Configuration Annotion Processor not found in classpath
- Freemarker中Configuration的setClassForTemplateLoading方法参数问题
- Web启动错误Failed to obtain BeanInfo for class [freemarker.template.Configuration]; nested exception is
- spring boot Configuration Annotation Proessor not found in classpath