When the struts project is deployed on ipva and the network is disconnected, an error is reported.
Reprinted please indicate the source: http://www.cnblogs.com/Joanna-Yan/p/6015693.html
Some time ago, after the project was deployed to the site, it was reported that Tomcat could be started normally, but sometimes the project could not be accessed and no error was reported. The following error is reported in the Tomcat log file:
Line: 178 - java/net/AbstractPlainSocketImpl.java:178:-1 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:835) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
Finally, it was found that the project could not access any web page as long as the network was disconnected, and the access was normal when the network was connected.
Originally, the DOCTYPE definition in the struts. xml file is:
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN""http://struts.apache.org/dtds/struts-2.0.dtd">
However, the xwork jar package I put is indeed 2.1, so the 2.0.dtd on the Internet will be accessed when there is a network, and an error will be reported if there is no network. Changed:
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN""http://struts.apache.org/dtds/struts-2.1.dtd">
Startup is normal. We hereby record it!