造成错误的原因:struts-config.xml文件中引入的dtd文件和Struts包的版本不匹配比如你在struts-config.xml中引入的文件是struts-config_1_2.dtd,你可以去org.apache.struts.resources包下看有没有struts-config_1_2.dtd文件,如果没有放一个进去放进去,之后还报这个错误,就看看Struts包的版本是不是1.2
有的时候工程中有错误也会报这个错误
09:17:17,906 ERROR [ActionServlet] Parsing error processing resource path java.net.UnknownHostException: struts.apache.org at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.HttpClient.openServer(HttpClient.java:402) at sun.net.www.http.HttpClient.openServer(HttpClient.java:618) at sun.net.www.http.HttpClient.(HttpClient.java:306) at sun.net.www.http.HttpClient.(HttpClient.java:267) at sun.net.www.http.HttpClient.New(HttpClient.java:339) at sun.net.www.http.HttpClient.New(HttpClient.java:320) at sun.net.www.http.HttpClient.New(HttpClient.java:315) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617) at java.net.URL.openStream(URL.java:913) at org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFactory.java:149) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:767) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubset(DefaultEntityHandler.java:566) at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1139) at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2145) at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2100) at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:831) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.commons.digester.Digester.parse(Digester.java:1572) at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:944) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:442) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy7.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:392) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy5.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy6.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272) at org.jboss.Main.boot(Main.java:150) at org.jboss.Main$1.run(Main.java:388) at java.lang.Thread.run(Thread.java:534)
分享到:
相关推荐
在本篇文章中,我们将深入探讨如何解决在MyEclipse环境下开发Struts应用时遇到的一个常见问题:“org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib...
import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionForward;import org.apache.struts.action.ActionMapping;import org.apache.struts.actions.DispatchAction等缺少
<?xml version="1.0" encoding="UTF-8"?... org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter <!-- 拦截所有的url --> <filter-name>struts2 <url-pattern>/* </web-app>
总的来说,`org.apache.struts2.dispatcher.FilterDispatcher`是Struts 2框架中一个至关重要的组件,负责请求的分发和Action的调用,对于理解和掌握Struts 2的运行机制具有重要意义。开发者需要熟悉其工作原理和配置...
最近在学struts2,遇到了个小...The file cannot be validated as the host "struts.apache.org" is currently unreachable 在网上找了很久,没有找到解决方法,后来自己解决了。 拿出来,希望对有同样问题的有点帮助。
总的来说,理解并解决"java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource"这一异常,不仅需要对Struts框架有一定了解,还需要掌握Java类加载机制以及数据库连接池的基本原理。通过正确...
S2-046 CVE-2017-5638 Struts 2.3.5-2.3.31,Struts 2.5-2.5.10 http://struts.apache.org/docs/s2-046.html 和S2-045一样 S2-045 CVE-2017-5638 Struts 2.3.5-2.3.31,Struts 2.5-2.5.10 ...
The org.apache.struts2.config.Configuration implementation class org.apache.struts2.config.Configuration接口名 struts.configuration.files A list of configuration files automatically loaded by ...
S2-057 CVE-2018-11776 Struts 2.3 to 2.3.34,Struts 2.5 to 2.5.16 https://cwiki.apache.org/confluence/display/WW/S2-057 影响范围非常小 S2-048 CVE-2017-9791 Struts 2.3.X ...
Struts2是一个流行的Java web应用程序框架,用于构建和维护可扩展、模块化和高度交互性的MVC(模型-视图-控制器)应用。在Struts2中,`struts.xml`是核心配置文件,它定义了应用的行为、动作、结果和其他组件。为了...
1. **struts.objectFactory**: 指定对象工厂,如Spring插件的`struts.objectFactory=org.apache.struts2.spring.StrutsSpringObjectFactory`。 2. **struts.i18n.locale**: 设置默认的语言环境,如`struts.i18n....
错误提示"Referenced file contains error (http://struts.apache.org/dtds/struts-2.0.dtd)"表明系统无法找到或解析指定的DTD文件,这通常是由于网络连接问题、DTD文件位置不正确或XML解析器无法识别DTD导致的。...
这个"org.apache.HTTP需要的jar包.zip"文件很可能包含了Apache HttpClient库所需的多个JAR文件。通常,这些JAR文件可能包括以下几个: 1. **httpclient.jar**:这是HttpClient的主要库,包含了执行HTTP请求的核心类...
总之,要解决`java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource`的问题,你需要确保你的项目正确包含了Apache Commons DBCP及其相关依赖,并正确配置了`BasicDataSource`。同时,了解...
默认值为org.apache.struts2.config.DefaultConfiguration。 2. struts.locale:设置Web应用的默认Locale,影响国际化(i18n)资源的加载。 3. struts.i18n.encoding:设定Web应用的默认字符编码,如GBK或GB2312,...
2. struts.configuration:这是Struts2的配置实现类,org.apache.struts2.config.Configuration。在这个配置类中可以设置Struts2的各种参数和设置。 3. struts.configuration.files:这是Struts2自动加载的一个配置...
- **默认值**:`org.apache.struts2.config.DefaultConfiguration`,这是Struts2默认使用的配置文件管理器。 - **自定义**:如果需要实现自定义的配置管理器,开发者需要创建一个实现了`Configuration`接口的类来...
"http://struts.apache.org/dtds/struts-2.0.dtd"> ``` - **XML版本声明**:指明了XML文档的版本号和编码方式。 - **DTD定义**:Document Type Definition,用于定义XML文档格式合法性,这里指定了Struts2的DTD...
S2-046 CVE-2017-5638 Struts 2.3.5-2.3.31,Struts 2.5-2.5.10 http://struts.apache.org/docs/s2-046.html 和S2-045一样 S2-045 CVE-2017-5638 Struts 2.3.5-2.3.31,Struts 2.5-2.5.10 ...
**含义**:指定实现`org.apache.struts2.config.Configuration`接口的类,用于自定义Struts2的配置方式。 **示例**:通过设置此属性可以使用自定义的配置实现类,从而实现更灵活的配置管理。 **应用场景**:当需要...