zoukankan      html  css  js  c++  java
  • Stuts2的"struts.devMode"设置成true后,不起作用,仍需要重启tomcat

    问题:
    在项目的struts.xml加入了常量配置:<constant name="struts.devMode" value="true" />后,重启服务器。
    项目后续开发中,修改action.java或者struts.xml仍然需要重启tomcat,和没有配置这个常量是一样的。
    百度后,说tomcat不能放在有空格的路径下。但是我用myeclipse中集成的tomcat或者自己独立的tomcat,都没有放在带空格的路径下。求大神解决。

    答案:

    我也困扰了好久,终于试出来了,不要用
    <constant name="struts.devMode" value="true" />
    改成:
    <constant name="struts.configuration.xml.reload" value="true"/>
    就OK了

    下面是4个开发模式常用配置的简介---
    <!-- 开启使用开发模式,详细错误提示 -->
    <!-- <constant name="struts.devMode" value="true"/>-->
    <!-- 指定每次请求到达,重新加载资源文件 -->
    <!-- <constant name="struts.i18n.reload" value="true"/>-->
    <!-- 指定每次配置文件更改后,自动重新加载 -->
    <!-- <constant name="struts.configuration.xml.reload" value="true"/>-->
    <!-- 指定XSLT Result使用样式表缓存 -->
    <!-- <constant name="struts.xslt.nocache" value="true"/>-->
     
  • 相关阅读:
    【linux 爱好者群】程序猿的那些聊天记录
    开发技巧记录
    tcmalloc 内存分析
    mktime很慢就自己去实现一个吧
    bash变量常用技巧
    文本处理sed常用操作
    【TED】如何掌握你的自由时间
    vim粘贴代码问题
    工作方式的反思-20170319
    【one day one linux】find 用法详解小记
  • 原文地址:https://www.cnblogs.com/todoit/p/3813648.html
Copyright © 2011-2022 走看看