【问题标题】:Adding a buildNumber in a jsp file在 jsp 文件中添加 buildNumber
【发布时间】:2017-06-21 02:57:54
【问题描述】:

我试图在 jsp 文件中获取内部版本号,但由于某种原因,在我在 pom.xml 中添加了一些条目后,服务器没有正确部署应用程序。我看到了内部版本号,但应用程序现在没有正确部署。不确定这是否是为 build.jsp 文件添加过滤的正确位置。

我添加了这些字段

<directory>${project.basedir}/WebContent/jsps</directory>
                    <targetPath>jsps</targetPath>
                    <filtering>true</filtering>
                    <includes>
                        <include>**/build.jsp</include>
                    </includes>

pom

<plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <warName>${project.name}${project.version}</warName>
                <webResources>
                    <webResource>
                        <directory>WebContent</directory>
                        <excludes>
                            <!-- exclude>images/**</exclude> <exclude>scripts/**</exclude> <exclude>styles/**</exclude -->
                            <exclude>assembly.xml</exclude>
                        </excludes>
                        <directory>${project.basedir}/WebContent/jsps</directory>
                        <targetPath>jsps</targetPath>
                        <filtering>true</filtering>
                        <includes>
                            <include>**/build.jsp</include>
                        </includes>
                    </webResource>
                </webResources>
            </configuration>
        </plugin>

【问题讨论】:

    标签: java maven jsp


    【解决方案1】:

    所以,我找到了解决方案。我只需要更新 Maven 项目就可以了,而且 pom.xml 没有任何问题。

    【讨论】:

      猜你喜欢
      • 2012-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-26
      • 2015-06-15
      • 1970-01-01
      • 2013-04-22
      • 1970-01-01
      相关资源
      最近更新 更多