【问题标题】:JRebel to monitor struts.xmlJRebel 监控 struts.xml
【发布时间】:2012-09-21 04:31:39
【问题描述】:

找不到任何有关此的信息。 JRebel 有什么方法可以监控 struts.xml 的变化。这在测试时发生了很大变化。

有什么办法吗?

已编辑

控制台

INFO: Starting Servlet Engine: Apache Tomcat/7.0.30

[2012-09-22 19:29:45] JRebel: Directory 'C:\MyProjects\4-Interceptors\target\classes' will be monitored for changes.
[2012-09-22 19:29:45] JRebel: Directory 'C:\MyProjects\4-Interceptors\src\main\webapp' will be monitored for changes.

[2012-09-22 19:29:50] JRebel-Log4j: Monitoring Log4j configuration in 'file:/C:/MyProjects/4-Interceptors/target/classes/log4j.properties'.

Rebel.xml

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">

    <classpath>
        <dir name="C:/MyProjects/4-Interceptors/target/classes">
        </dir>
    </classpath>

    <web>
        <link target="/">
            <dir name="C:/MyProjects/4-Interceptors/src/main/webapp">
            </dir>
        </link>
    </web>

</application>

【问题讨论】:

    标签: jakarta-ee struts2 jrebel


    【解决方案1】:

    只需将rebel.xml 添加到项目文件夹中的项目resource 文件夹中即可。它会自动检测struts.xml中的每一个变化。

    注意:: jrebel 不依赖于框架。

    【讨论】:

    • 我试过了,但是 rebel 没有监控 struts.xml。我有 maven 项目,struts.xml 在资源文件夹中。 log4j.properties 也在那里,它被监控但没有 struts.xml
    【解决方案2】:

    您使用哪个版本的 Struts?您对文件所做的更改是什么?也许这还没有实现。您可以做的最好的事情是提供一个示例应用程序并将您的问题描述发送给 JRebel 支持

    【讨论】:

    • 这是一个简单的测试项目。我在问题中添加了更多信息。请参阅上面的编辑部分。谢谢
    • Struts2 最新版本。不知道改什么引入struts.xml文件被监控。
    • 你怎么知道它没有被监控?为此,您必须更改 struts.xml 中的某些内容,对吗?那么,您对 struts.xml 做了哪些更改?
    • 喜欢将结果更改为不同的页面。动作名称的变化等。许多你知道 struts.xml 变化的变化没有反映。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-26
    • 1970-01-01
    相关资源
    最近更新 更多