When the struts project is deployed on ipva and the network is disconnected, an error is reported.

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.