- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
由于我 PC 的性能问题,我没有使用 Eclipse-Tomcat-Maven 集成的标准路线。我所做的是使用 Maven 构建我的更改,然后手动将文件复制到 Tomcat webapps 文件夹。
每当我将 JSP 文件复制到 webapps 文件夹时,我都可以看到更改已反射(reflect)出来。但是,对于类文件,根本不会反射(reflect)更改。
我只是在我的类的方法中做一些小的改变(添加一个系统输出,或删除一行代码等),而不是做任何结构上的改变。
在我的 server.xml 中,我可以看到 autodeploy 和 deployonstartup 设置为 true。
<Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat01" debug="0">
<Host appBase="webapps" name="localhost" autoDeploy="true"
deployOnStartup="true" unpackWARs="true" deployXML="true">
Tomcat版本为Apache Tomcat/6.0.29
谁能告诉我哪里出了问题?
最佳答案
正在读取 tomcat6 documentation和 Deploying on a running Tomcat server
部分,它在最后一行声明:
Note that web application reloading can also be configured in the loader, in which case loaded classes will be tracked for changes.
因此去装载机documentation您可以看到设置加载器配置的属性 reloadable
将完全按照您的要求执行
reloadable: Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. You can use the Manager web application, however, to trigger reloads of deployed applications on demand. NOTE - The value for this property will be inherited from the reloadable attribute you set on the surrounding Context component, and any value you explicitly set here will be replaced.
关于Tomcat Hot Deplot 适用于 JSP 文件但不适用于 Java 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17802440/
由于我 PC 的性能问题,我没有使用 Eclipse-Tomcat-Maven 集成的标准路线。我所做的是使用 Maven 构建我的更改,然后手动将文件复制到 Tomcat webapps 文件夹。
我是一名优秀的程序员,十分优秀!