-
1. Re: CAS Filter with Richfaces
nbelaevski Jun 5, 2009 7:05 AM (in response to oichris)Hi,
What CAS filter are you using: looks like there are two available: org.jasic.cas.* and edu.yale.its.tp.cas.*? -
2. Re: CAS Filter with Richfaces
oichris Jun 7, 2009 9:11 PM (in response to oichris)Hi nbelaevski,
I am using the edu.yale.its.tp.cas.* one.
Any clue?
Thanks a lot. -
3. Re: CAS Filter with Richfaces
nbelaevski Jun 8, 2009 5:37 AM (in response to oichris)Please post your web.xml also.
-
4. Re: CAS Filter with Richfaces
oichris Jun 9, 2009 10:24 PM (in response to oichris)Here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>Playground</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<!-- richfaces configure -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
<param-value>true</param-value>
</context-param>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<filter-name>CAS Filter</filter-name>
<filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
<param-value>
https://www.oichris.com/esupcas/login
</param-value>
</init-param>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
<param-value>
https://www.oichris.com/esupcas/serviceValidate
</param-value>
</init-param>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
<param-value>localhost:8080</param-value>
</init-param>
<filter-mapping>
<filter-name>CAS Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
REQUEST
FORWARD
INCLUDE
</filter-mapping>
<session-config>
<session-timeout>1</session-timeout>
</session-config>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</web-app> -
5. Re: CAS Filter with Richfaces
ilya_shaikovsky Jun 10, 2009 5:07 AM (in response to oichris)from the beginning RichFaces filter and its mapping should be declared first in web.xml. Please give it a try.
-
6. Re: CAS Filter with Richfaces
ilya_shaikovsky Jun 10, 2009 5:27 AM (in response to oichris)sorry.. small addition.. map both filters to servlet by name and declare the RichFaces filter first.
-
7. Re: CAS Filter with Richfaces
oichris Jun 10, 2009 6:17 AM (in response to oichris)Thanks ilya,
I changed my web.xml to the following but still does not work. The page refreshes itself and the session become alive. It simply skip those A4J.AJAX.onExpired function.
But if I remove the CAS filter, everything goes fine.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>Playground</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<!-- richfaces configure -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
<param-value>true</param-value>
</context-param>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
REQUEST
FORWARD
INCLUDE
</filter-mapping>
<filter-name>CAS Filter</filter-name>
<filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
<param-value>
https://www.ottoint.com/esupcas/login
</param-value>
</init-param>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
<param-value>
https://www.ottoint.com/esupcas/serviceValidate
</param-value>
</init-param>
<init-param>
<param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
<param-value>localhost:8080</param-value>
</init-param>
<filter-mapping>
<filter-name>CAS Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-name>paraFilter</filter-name>
<filter-class>com.ottoint.cas.client.filter.CASParaFilter</filter-class>
<filter-mapping>
<filter-name>paraFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<session-config>
<session-timeout>1</session-timeout>
</session-config>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</web-app>
Thanks a lot for your kind help. -
8. Re: CAS Filter with Richfaces
ilya_shaikovsky Jun 10, 2009 6:28 AM (in response to oichris)and thanks for your updates. we will check it additionally.
-
9. Re: CAS Filter with Richfaces
oichris Jul 6, 2009 10:23 PM (in response to oichris)Hello ilya,
May I know if there is any update for this issue? Thanks.