如何使用spring security在showcase网站上显示primefaces版本?

如何使用spring security在showcase网站上显示primefaces版本?,primefaces,Primefaces,我在glassfish 4服务器上运行了一个修改过的primefaces showcase,大多数东西都能正常工作,但是该版本没有正确显示在网站底部。我采用了原始版本,并将其与spring security相结合 template.xhtml中的代码 Running #{build.primefacesVersion} on #{build.jsfVersion}. 原版给了我 Running PrimeFaces-5.1 on Mojarra-2.2.7 修改后的版本显示 Running

我在glassfish 4服务器上运行了一个修改过的primefaces showcase,大多数东西都能正常工作,但是该版本没有正确显示在网站底部。我采用了原始版本,并将其与spring security相结合

template.xhtml中的代码

Running #{build.primefacesVersion} on #{build.jsfVersion}.
原版给了我

Running PrimeFaces-5.1 on Mojarra-2.2.7
修改后的版本显示

Running ${primefacesVersion} on ${jsfVersion}.

也许问题出在我的配置上

faces-config.xml

<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">

<application>
    <action-listener>org.primefaces.application.DialogActionListener</action-listener>
    <navigation-handler>org.primefaces.application.DialogNavigationHandler</navigation-handler>
    <view-handler>org.primefaces.application.DialogViewHandler</view-handler>
    <navigation-handler>org.primefaces.mobile.application.MobileNavigationHandler</navigation-handler>
    <locale-config>
        <default-locale>en</default-locale>
    </locale-config>
    <el-resolver>org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver</el-resolver>
    <resource-bundle>
        <base-name>build</base-name>
        <var>build</var>
    </resource-bundle>
    <resource-bundle>
        <base-name>/Bundle</base-name>
        <var>bundle</var>
    </resource-bundle>
    <resource-bundle>
        <base-name>/Bundle</base-name>
        <var>bundle</var>
    </resource-bundle>
</application>

<converter>
    <converter-id>theme</converter-id>
    <converter-class>org.primefaces.showcase.convert.ThemeConverter</converter-class>
</converter>

<factory>
    <exception-handler-factory>org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory</exception-handler-factory>
</factory>

<!-- for spring security -->
<lifecycle>
    <phase-listener>edu.wctc.maven.glassfish.jsfsecure.util.LoginErrorPhaseListener</phase-listener>
</lifecycle>

我找到了解决方案,它必须在pom.xml中定义。我已删除了该节,该节定义如下:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>edu.wctc.maven.glassfish</groupId>
<artifactId>jsfsecure_copy</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>

<name>jsfsecure_copy</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
    <org.springframework.version>4.0.3.RELEASE</org.springframework.version>
    <spring-security.version>3.2.5.RELEASE</spring-security.version>
    <junit.version>4.11</junit.version>
    <aspectj.version>1.7.1</aspectj.version>
</properties>

<dependencies>
    [...]
</dependencies>

<repositories>
    [...]
</repositories>

<build>
    [...]
</build>

<profiles>
    <profile>
        <id>stable</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <jsfVersion>Mojarra-2.2.7</jsfVersion>
            <primefacesVersion>PrimeFaces-5.1</primefacesVersion>
        </properties>
        <dependencies>
            <dependency>
                <groupId>org.primefaces</groupId>
                <artifactId>primefaces</artifactId>
                <version>5.1</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.faces</artifactId>
                <version>2.2.7</version>
            </dependency>
        </dependencies>
    </profile>
</profiles>
它正在引用pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>edu.wctc.maven.glassfish</groupId>
<artifactId>jsfsecure_copy</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>

<name>jsfsecure_copy</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
    <org.springframework.version>4.0.3.RELEASE</org.springframework.version>
    <spring-security.version>3.2.5.RELEASE</spring-security.version>
    <junit.version>4.11</junit.version>
    <aspectj.version>1.7.1</aspectj.version>
</properties>

<dependencies>
    [...]
</dependencies>

<repositories>
    [...]
</repositories>

<build>
    [...]
</build>

<profiles>
    <profile>
        <id>stable</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <jsfVersion>Mojarra-2.2.7</jsfVersion>
            <primefacesVersion>PrimeFaces-5.1</primefacesVersion>
        </properties>
        <dependencies>
            <dependency>
                <groupId>org.primefaces</groupId>
                <artifactId>primefaces</artifactId>
                <version>5.1</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.faces</artifactId>
                <version>2.2.7</version>
            </dependency>
        </dependencies>
    </profile>
</profiles>
jsfVersion=${jsfVersion}
primefacesVersion=${primefacesVersion}
<properties>
    <jsfVersion>Mojarra-2.2.7</jsfVersion>
    <primefacesVersion>PrimeFaces-5.1</primefacesVersion>
</properties>