SSH struts问题,运行web程序报错 50
ERROR[org.apache.struts2.dispatcher.Dispatcher]-DispatcherinitializationfailedUnablet...
ERROR [org.apache.struts2.dispatcher.Dispatcher] - Dispatcher initialization failed
Unable to load configuration. - [unknown location]
Caused by: Unable to load jar:file:/D:/tomcat/apache-tomcat-7.0.52/webapps/login_7/WEB-INF/lib/struts2-core-2.3.24.1.jar!/struts-default.xml - [unknown location]
Caused by: Connection timed out: connect - [unknown location]
Caused by: java.net.ConnectException: Connection timed out: connect 展开
Unable to load configuration. - [unknown location]
Caused by: Unable to load jar:file:/D:/tomcat/apache-tomcat-7.0.52/webapps/login_7/WEB-INF/lib/struts2-core-2.3.24.1.jar!/struts-default.xml - [unknown location]
Caused by: Connection timed out: connect - [unknown location]
Caused by: java.net.ConnectException: Connection timed out: connect 展开
3个回答
展开全部
无法加载配置,检查下jar包是否完整!
除了
commons-logging-1.0.4.jar
freemarker-2.3.12.jar
ognl-2.6.11.jar
struts2-core-2.1.8.jar
xwork-2.1.1.jar
这五个核心lib要复制外,
依次加载下面两个lib
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
另外,还要注意是不是原先的代码有问题!
仔细看下你的错误信息
Unable to load configuration. - action file:/D:/tomcat/apache-tomcat-7.0.52/webapps/login_7/WEB-INF/lib/struts2-core-2.3.24.1.jar!/struts-default.xml
它不能加载struts.xml这里的配置,你仔细检查下那个文件的代码!
除了
commons-logging-1.0.4.jar
freemarker-2.3.12.jar
ognl-2.6.11.jar
struts2-core-2.1.8.jar
xwork-2.1.1.jar
这五个核心lib要复制外,
依次加载下面两个lib
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
另外,还要注意是不是原先的代码有问题!
仔细看下你的错误信息
Unable to load configuration. - action file:/D:/tomcat/apache-tomcat-7.0.52/webapps/login_7/WEB-INF/lib/struts2-core-2.3.24.1.jar!/struts-default.xml
它不能加载struts.xml这里的配置,你仔细检查下那个文件的代码!
追问
jar包应该放到哪里啊
追答
WEB项目的话,直接拷贝到webroot/web-info/lib里....
如果是JAVA project 的话,右键项目,build path ->add external jars
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询