【问题标题】:How to find the Struts version being used in a project如何找到项目中使用的 Struts 版本
【发布时间】:2010-10-26 08:45:15
【问题描述】:

如何在 Eclipse 的 Web 应用程序项目 中找到 正在使用的 Struts 版本

我的 struts-config.xml

<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts 
Configuration 1.2//EN"

"http://struts.apache.org/dtds/struts-config_1_2.dtd">

谢谢。

【问题讨论】:

    标签: struts


    【解决方案1】:

    打开 struts jar 并在 META-INF 文件夹内的 MANIFEST 文件中读取版本。

    【讨论】:

      【解决方案2】:

      我们可以通过观察 Struts-config 文件的 doctype 来找出 struts 的版本。 例如,如果您的 struts 配置文件包含以下 DTD,那么我们可以说它是 Struts 1.1 版本。

      <!DOCTYPE struts-config PUBLIC 
      "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" 
      "http://jakarta.apache.org/struts/dtds/**struts-config_1_1.dtd**">
      

      【讨论】:

        【解决方案3】:

        在 Windows 系统上:

        1. 打开文件资源管理器,搜索struts*.jar
        2. 使用解压工具(例如 IZArc2Go)打开 struts-core.jar
        3. 打开 META-INF 文件夹并使用文本编辑器打开 MANIFEST.MF 文件
        4. 您会在此处找到 Specification-Version: 以及版本号

        一些额外的发布信息:

        【讨论】:

          【解决方案4】:

          并且要在 manifest.mf 中查看的属性是“规范版本”

          【讨论】:

            【解决方案5】:

            不要参考 Manifest 版本。相反,您指的是“规范版本”

            例如: 规范版本:1.2.4

            这意味着 struts 版本是 1.2.4

            【讨论】:

              猜你喜欢
              • 2013-01-02
              • 1970-01-01
              • 2016-06-18
              • 2021-06-25
              • 1970-01-01
              • 2017-09-20
              • 2017-11-14
              • 2011-03-14
              • 1970-01-01
              相关资源
              最近更新 更多