我在google上搜到一个页面,看了半天,不知道啥东东,我用JBuilder编译,tomcat用自带的:
A. Common QuestionsIf running an installation script produces the following error message: java.net.ConnectException: Connection timed outat org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2870)at ... That probably means all outgoing HTTP traffic from machineA is blocked unless it goes through a specific proxy. You need to update the file data/runtime/runtime.local.properties in the module iceni-bootstrap to define the following properties: http.proxyHost=<name of the cache>
http.proxyPort=<port of the cache>
You might also need to define the property http.nonProxyHost . The properties http.proxyHost and http.proxyPort indicate the proxy server and port that the http protocol handler will use. http.nonProxyHosts indicates the hosts which should be connected too directly and not through the proxy server. More informations on how to set these properties can be found at http://java.sun.com/j2se/1.4.1/docs/guide/net/properties.html . The properties defined in that file will be set both by the bootstrap mechanism and the application started through the bootstrap
A. Common QuestionsIf running an installation script produces the following error message: java.net.ConnectException: Connection timed outat org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2870)at ... That probably means all outgoing HTTP traffic from machineA is blocked unless it goes through a specific proxy. You need to update the file data/runtime/runtime.local.properties in the module iceni-bootstrap to define the following properties: http.proxyHost=<name of the cache>
http.proxyPort=<port of the cache>
You might also need to define the property http.nonProxyHost . The properties http.proxyHost and http.proxyPort indicate the proxy server and port that the http protocol handler will use. http.nonProxyHosts indicates the hosts which should be connected too directly and not through the proxy server. More informations on how to set these properties can be found at http://java.sun.com/j2se/1.4.1/docs/guide/net/properties.html . The properties defined in that file will be set both by the bootstrap mechanism and the application started through the bootstrap
为什么不用jdom呢,操作起来很方便。 public static Document Readfromfile(String filePath) {
try {
java.io.File XmlFile;
String XmlFileName;
XmlFile = new java.io.File(filePath);
SAXBuilder builder = new SAXBuilder();
Document anotherDocument = builder.build(new File(filePath));
return anotherDocument;
}
catch (Exception e) {
e.printStackTrace();
return null;
}
}
java.net.ConnectException: Connection timed out: connect
所以你一解析就会先连这个url导致
java.net.ConnectException: Connection timed out: connect