「已注销」 2016-09-05 13:39 采纳率: 80%
浏览 1123
已采纳

tomcat启动struts1.3项目超时,如何解决?

我的struts1.3项目在以前的网络(A城市的电信)下是启动起来的,现在换了网络(B城市的移动)启动不起来了,我在怀疑是不是eclipse读取dtd文件的时候太慢了。导致启动失败,在工作过程中,我也有tomcat启动超过45秒的情况,一般是把tomcat timeout配置更长,可是这很不科学,因为他在启动的时候就卡住了,你把tomcat启动允许最大时间配置的再长也无法。
控制台输出如下:

 九月 05, 2016 9:29:17 下午 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\jdk\jdk_7u79\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/jdk/jdk_7u79/bin/../jre/bin/client;C:/jdk/jdk_7u79/bin/../jre/bin;C:/jdk/jdk_7u79/bin/../jre/lib/i386;D:\app\Administrator\product\11.2.0\dbhome_1\bin;C:\jdk\jdk_7u79\bin;C:\Windows\System32;C:\Program Files\Subversion\bin;C:\Program Files\TortoiseSVN\bin;D:\maven\apache-maven-3.3.9\bin;;C:\Windows;C:\Windows\system32\wbem;D:\mysql-5.6.24-win32\bin;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\JavaTools\eclipse;;.
九月 05, 2016 9:29:18 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:FileUpdateAndDownload' did not find a matching property.
九月 05, 2016 9:29:19 下午 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-6789
九月 05, 2016 9:29:19 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2486 ms
九月 05, 2016 9:29:19 下午 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
九月 05, 2016 9:29:19 下午 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.44
九月 05, 2016 9:29:21 下午 org.apache.struts.action.ActionServlet initChain
信息: Loading chain catalog from jar:file:/D:/JavaProgram/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/FileUpdateAndDownload/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml

我的struts-config.xml配置如下:

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC 
    "-Apache Software Foundation//DTD struts Configuration 1.3//EN" 
    "http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
    <!-- 配置表单 -->
    <form-beans>
        <form-bean name="loginForm" type="com.shizongger.web.form.LoginForm" />
    </form-beans>
    <!-- 配置action -->
    <action-mappings>
        <action path="/login" name="loginForm" type="com.shizongger.web.action.LoginAction" >
            <forward name="success" path="WEB-INF/users/main.jsp" />
            <forward name="fail" path="WEB-INF/users/login.jsp" />
        </action>
    </action-mappings>
</struts-config>

web.xml配置如下:

 <?xml version="1.0" encoding="UTF-8"?>
<web-app 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    id="WebApp_ID" 
    version="2.5">
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/config/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
</web-app>
  • 写回答

2条回答 默认 最新

  • z_nasy 2016-09-05 23:39
    关注

    我认为你是不是少导入了一些jar包呢!
    commons-chain-1.1.jar(主要改进之一)
      struts-core-1.3.8.jar(这个包一定要的)
      struts-extras-1.3.8.jar(一些实用的action,一般是要用的)
      struts-taglib-1.3.8.jar(标签基本都要用)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog