且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Linux + openJDK中运行struts + tomcat6应用程序错误

更新时间:2023-01-10 10:08:00

如果收到类似

原因:java.net.UnknownHostException:struts.apache.org

Caused by: java.net.UnknownHostException: struts.apache.org

在构建Struts2 XML配置期间,这会阻止应用程序成功检索 DTD .

during the building of the Struts2 XML configuration, then something is preventing the application from successfully retrieving the DTD.

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

本地引用或仅将DTD内容复制并粘贴到其位置即可解决此问题.

to either a local reference or just copying and pasting the DTD contents into its place will resolve the issue.