coldfusion - 未遵守 web.xml 中的默认文档(开发人员/独立服务器)

标签 coldfusion coldfusion-10

出于某种原因,当浏览到以文件夹结尾的 URL(例如//localhost:8500/website/directory/)时,index.cfm 不会加载,而是返回 404 错误页面。我已经确认 ...\web-inf\web.xml 文件正在通过修改过滤器映射来使用,以启用 .htm 和 .txt 文件的显示。事实上,welcome-file-list 部分中的任何文件都没有被使用,即使它们存在,这让我相信 web.xml 文件的这一部分有问题。

web.xml 文件如下:

  • {install-root}\cfusion\runtime\conf\web.xml
  • {install-root}\cfusion\wwwroot\web-inf\web.xml

  • 这两个文件都包含下面列出的相同 XML。

    <web-app>
    ...
    <welcome-file-list id="WelcomeFileList_1034013110672">
        <welcome-file>index.cfm</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.txt</welcome-file>
    </welcome-file-list>
    ...
    </web-app>
    


    我最近刚刚修补了更新 6,但我相信问题从初始安装就一直存在。请注意,这是开发独立服务器。

    有没有人已经解决了这个问题,或者对除了重新安装 CF10 和使用 IIS 之外的其他方法有什么想法?

    最佳答案

    聚会迟到,IMO 对于这个问题,我可以想到两个可能的原因

  • 要么你有额外的映射,比如“/”,它会接管 servletcontainer 的内置默认 servlet,它负责转到正确的根路径
  • 您的文件夹名称是 CF 已经具有映射的名称,例如/flashservices/gateway/, CFFormGateway, cfform-internal, WSRPProducer, JSDebugServlet, flex2gateway

  • 我认为分享您的 web.xml 可能有助于在此处指出问题。

    关于coldfusion - 未遵守 web.xml 中的默认文档(开发人员/独立服务器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14329937/

    相关文章:

    ColdFusion : "Element __ is undefined in FORM." 中的 HTML 表单错误

    Coldfusion 密码保护的 RSS 源

    coldfusion - 在 CFC 中使用数据源的最佳实践

    coldfusion - 在 cfoutput 标签内编写 cfquery?

    sql - 当所有字段都是可选的时更新查询

    coldfusion - CFSpreadsheet 读取 - 更新到 Windows 10 后小数符号错误

    coldfusion - 如何将 Coldfusion10 查询的结果导出为 html?

    serialization - SerializeJSON 和 DeserializeJSON 对于 cfcatch block 无法正常工作

    iis - 无法让 IIS 7/Coldfusion 提供 404

    tomcat - 404 处理程序卡在 ColdFusion 10 上,在 ColdFusion 8 上完美运行