coldfusion - CF admin 中的自定义缺失模板处理程序

标签 coldfusion coldfusion-2016

当我尝试在 CF 管理设置中将我的自定义错误页面指定为缺少模板处理程序时,出现以下错误。

The file specified as the site wide missing template handler does not exist. The default missing template handler will be used until a replacement is created.

这是我文件的操作系统路径

C:\ColdFusion2016\cfusion\wwwroot\ErrorPages\404.cfm

这是我的网络路径

http://localhost:8500/ErrorPages/404.cfm

我尝试了两个路径,但给出了相同的错误,我检查并确保该文件存在于路径中。那为什么会出现这个错误呢?

最佳答案

缺少模板处理程序 输入字段要求相对路径

Specify the relative path to the template to execute when ColdFusion cannot find a requested template.

在您的情况下,C:\ColdFusion2016\cfusion\wwwroot\ErrorPages\404.cfm 是绝对路径,它不会起作用。

输入:/ErrorPages/404.cfm,这个应该可以。

关于coldfusion - CF admin 中的自定义缺失模板处理程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49002483/

相关文章:

mysql - 为什么 mySQL 中会发生重复(和不需要的)插入?

coldfusion - 定时任务输出到html Coldfuson 2016

json - 在 ColdFusion 中将数据转换为 JSON 时出错

coldfusion - 通过 Coldfusion 中的 cfset 的长/多行内容

java - 具有 IP 验证且仅允许用户投票的机制 : problem in getting user IP address with two app servers and apache in front

Coldfusion StructSetMetaData 不更新结构内数组中的项目

coldfusion - 如何在 ColdFusion 2016 中动态设置电子表格自动过滤器?

jquery - 可使用 jQuery 和 Ajax 进行排序

java - 使用 ColdFusion 从 Outlook .msg 文件中提取附件