0
PrettyFaces를 URL 재 작성에 사용하고 응용 프로그램 서버로 Glassfish 4를 사용하고 prettyfaces로 URL을 잘 관리했지만 서버를 WildFly 8.0으로 마이그레이션 한 후 해당 ID를 사용하여 페이지를 가져올 수 없습니다.PrettyFaces가 WildFly에서 작동하지 않습니다
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Cursus Management</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext-security.xml
/WEB-INF/applicationContext.xml
</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>com.ocpsoft.pretty.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>bootstrap</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<filter>
<filter-name>Pretty Filter</filter-name>
<filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Pretty Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
꽤-설정 :
여기은 web.xml에 있습니다 : 꽤-config.xml에 정의 (포트 /../ page1.jsf을 난 단지 COMPLET의 URL의 예 도메인을 사용하여 페이지를 얻을 수 있습니다) .xml
<pretty-config xmlns="http://ocpsoft.com/prettyfaces/3.3.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ocpsoft.com/prettyfaces/3.3.3
http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.3.xsd">
<!-- Begin UrlMappings -->
<url-mapping id="test">
<pattern value="/test" />
<view-id value="/pages/test.jsf" />
</url-mapping>
<url-mapping id="home">
<pattern value="/" />
<view-id value="/pages/index.jsf" />
...
</pretty-config>
의 pom.xml에 정의 prettyface의 종속성 :
<!-- PrettyFaces -->
<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>prettyfaces-jsf2</artifactId>
<version>3.3.3</version>
</dependency>
제이보스 8.0은 오래되어 HTTP 세션 처리에 관한 몇 가지 어색한 버그가 있습니다 (PrettyFaces 지금 재 작성의 확장입니다. 주) http://ocpsoft.org/prettyfaces/
: 여기에 업데이트 된 설치 지침을 참조하십시오. 대신 현재 8.2를 사용해보고하십시오. – BalusC
그리고 PrettyFaces 3.3.3도 매우 오래된 것입니다. 대신 PrettyFaces 모듈로 다시 쓰기를 사용해야합니다. 참조 : http://ocpsoft.org/rewrite/ 및 마이그레이션 가이드 : http://ocpsoft.org/rewrite/docs/migration/prettyfaces3 – chkal
@BalusC 대단히 감사합니다. 많은 문제를 해결할 수 있도록 도와주었습니다. 이 마지막 날. chkal 나는 당신이 제안한 것을했으며 지금은 효과가 있습니다. – SSouhaieb