java - 由于主机 "struts.apache.org"当前无法访问,因此无法验证该文件

标签 java model-view-controller struts-1

在struts-config.xml中声明Doc类型下

<!DOCTYPE struts-config PUBLIC
      "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
      "http://struts.apache.org/dtds/struts-config_1_3.dtd">

在 xml 中的 url“http://struts.apache.org/dtds/struts-config_1_3.dtd”处,得到以下消息:“该文件无法验证为主机”struts.apache .org”目前无法访问。”

由于此原因,我无法部署该应用程序。

知道如何解决上述问题。

最佳答案

您问题中的链接对我来说效果很好,但下面的链接是我当前正在使用的,尝试一下看看?

http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd

编辑:本地引用 dtd。我认为这应该可以解决问题。

  1. 复制struts-config_1_3.dtd,然后放入/WEB-INF/dtd文件夹
  2. 将struts-config.xml中的doctype修改为此

    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "../dtd/struts-config_1_3.dtd">

关于java - 由于主机 "struts.apache.org"当前无法访问,因此无法验证该文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9661866/

相关文章:

java - 如何更改 JavaMail 端口

java - Action 类是否具有像formbean这样的范围

css - 支柱 html :text styleclass

html - Struts 标签替换

java - MVC Java : How does a Controller set listeners to the children classes of a View

java - 当元素重新排序时,使用 XMLunit 进行 XML 比较不起作用

java - 以编程方式删除所有 SdCard 文件

java - 标签 fragment 发现意外的命名空间前缀 "wallet"

java - MVC,其中模型没有内在的视觉表示

c# - 从 Controller 下载Spire.doc文档进行查看