【问题标题】:System properties for TomcatTomcat 的系统属性
【发布时间】:2017-08-29 15:47:24
【问题描述】:

在Wildfly中,有一组系统属性集,你可以调用System.getProperties()来获取Wildfly根目录是什么,config目录,deployment目录,data目录等。See here在“路径”标题。

是否有类似的页面显示它们对 Tomcat 的用途?我一直在四处寻找,但似乎找不到。

【问题讨论】:

    标签: java tomcat wildfly


    【解决方案1】:

    你可以在你的tomcat环境中添加你自己的JSP,里面有这段代码:

    系统属性:

    <table>
        <%
            Enumeration e = System.getProperties().keys();
            while (e.hasMoreElements()) {
                String name = (String) e.nextElement();
        %><tr>
            <td><%=name%><td><%=System.getProperty(name)%> <%
         }
     %>
    
    </table>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-09
      • 2021-09-29
      • 1970-01-01
      • 1970-01-01
      • 2012-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多