主题 : 关于*题模板的使用问题 |
级别: 解元
![]() |
12# 发表于:2018-02-09 17:25:20 IP:112.35.*.*
回复第11楼
嗯,是的,也会提示找不到,topic_zhjyglpt.html这个文件就是我复制topic_default.html过来的,一样提示找不到 |
||
---|---|---|---|
级别: 解元
![]() |
15# 发表于:2018-02-11 09:44:47 IP:112.35.*.*
回复第11楼
请问,这个有解决办法吗? 我是以源码的方式,部署项目的,是只有我这边才有问题吗? |
||
---|---|---|---|
级别: 总版主
![]() |
16# 发表于:2018-02-11 09:53:57 IP:182.12.*.*
这个你要么就用默认名称的专题来做 |
||
---|---|---|---|
级别: 解元
![]() |
17# 发表于:2018-02-11 09:58:20 IP:112.35.*.*
回复第16楼
默认专题模板是指哪个文件?topic/topic_default.html? |
||
---|---|---|---|
级别: 解元
![]() |
18# 发表于:2018-02-11 10:23:17 IP:112.35.*.*
回复第16楼
我又在其它同事的电脑部署了下,还是同样的问题,又做了下面的实验,可以确认,这个是你们后台的bug: 1.新建模板目录,但是没有专题目录topic: ![]() 2.前端通过专题标签访问报错(注意红色字体部分): 二月 11, 2018 9:53:02 上午 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet [JeeCmsFront] in context with path [/jeecmsv9f] threw exception freemarker.template.TemplateNotFoundException: Template not found for name "/WEB-INF/t/cms/www/zhjyglpt/topic/topic_default.html". The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp", canonicalBasePath="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp\"), loader2 = ClassTemplateLoader(resourceLoaderClass=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer, basePackagePath="" /* relatively to resourceLoaderClass pkg */)). at freemarker.template.Configuration.getTemplate(Configuration.java:2485) at freemarker.template.Configuration.getTemplate(Configuration.java:2287) 3.模板目录中,加入专题目录topic(从default目录中copy过来,没有做任何修改) ![]() 4.前端通过专题标签可以正常访问 5.在后台专题管理中指定专题模板(不使用默认模板) ![]() 6.点击专题后,页面异常,后台报错,如下: ![]() 二月 11, 2018 10:20:16 上午 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet [JeeCmsFront] in context with path [/jeecmsv9f] threw exception [Request processing failed; nested exception is org.springframework.context.ApplicationContextException: Could not load FreeMarker template for URL [/zhjyglpt/topic/topic_default.html]; nested exception is freemarker.template.TemplateNotFoundException: Template not found for name "/zhjyglpt/topic/topic_default.html". The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp", canonicalBasePath="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp\"), loader2 = ClassTemplateLoader(resourceLoaderClass=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer, basePackagePath="" /* relatively to resourceLoaderClass pkg */)).] with root cause freemarker.template.TemplateNotFoundException: Template not found for name "/zhjyglpt/topic/topic_default.html". The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp", canonicalBasePath="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp\"), loader2 = ClassTemplateLoader(resourceLoaderClass=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer, basePackagePath="" /* relatively to resourceLoaderClass pkg */)). at freemarker.template.Configuration.getTemplate(Configuration.java:2485) at freemarker.template.Configuration.getTemplate(Configuration.java:2287) 7.可以看出上面红色字体的部分,路径不同,指定模板的时候把前面的/WEB-INF/t/cms/www/路径给丢了,后台bug |
||
---|---|---|---|
级别: 解元
![]() |
20# 发表于:2018-02-11 10:34:47 IP:112.35.*.*
回复第19楼
是的,9.2版本 bug我已经反馈到【BUG反馈】版块 http://bbs.jeecms.com/bug/64740.jhtml |
||
---|---|---|---|