我在Windows Tomcat 5.5.27服务器上启用了类重新加载,但我无法在Linux Tomcat 5.5.28服务器上运行它 . 我正在做的是在Windows机器上在Eclipse中开发我的类,并让WinSCP监视我的bin输出并自动将更改上传到服务器上的WEB-INF / classes文件夹 .

什么样的问题可以阻止Tomcat 5.5服务器动态重新加载类?正在工作的是,每当我对其中一个xml conf文件进行更改时,都会重新加载应用程序 .

我的tomcat / conf / Catalina / localhost / ROOT.xml文件:

<Context docBase="/usr/local/rtfiles/runtime" path="/"
     privileged="true" antiResourceLocking="false" antiJARLocking="false"
     reloadable="true" >
  <Manager className="org.apache.catalina.session.PersistentManager"
    debug="0" saveOnRestart="false" maxActiveSessions="-1" minIdleSwap="-1"
    maxIdleSwap="-1" maxIdleBackup="-1">
    <Store className="org.apache.catalina.session.FileStore"/>
  </Manager>
</Context>

和我的tomcat / conf / context.xml文件(我知道,“可重新加载”部分应该是多余的,但它不适用于任何一个:

<?xml version="1.0" encoding="UTF-8"?>
<!-- The contents of this file will be loaded for each web application -->
<Context reloadable="true">
  <!-- Default set of monitored resources -->
  <WatchedResource>WEB-INF/web.xml</WatchedResource>
  <!-- Uncomment this to disable session persistence across Tomcat restarts -->
  <!--
  <Manager pathname="" />
  -->
</Context>