This content has been marked as final.
Show 3 replies
-
1. Re: Struts2 and Richfaces?
ishabalov Jun 18, 2007 7:35 PM (in response to klester)I think you are the first who try such configuration.
You really need to figure our workable configuration in web.xml. Try to move stuff around, sometimes the right sequence of definitions actually matters. -
2. Re: Struts2 and Richfaces?
klester Jun 19, 2007 6:48 PM (in response to klester)Got it working. I had to switch the ajax4jsf filter mapping to be based off a URL rather than the Faces servlet. My updated web.xml is below:
<?xml version="1.0"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>Struts2-JSF</display-name> <!-- Context Parameters --> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.SKIN</param-name> <param-value>blueSky</param-value> </context-param> <!-- End Context Parameters --> <!-- Filter definitions --> <filter> <display-name>Ajax4jsf Filter</display-name> <filter-name>ajax4jsf</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> </filter> <filter-mapping> <filter-name>ajax4jsf</filter-name> <url-pattern>*.action</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> <!-- Start Struts Filter --> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- End Struts Filter --> <!-- End Filter definitions --> <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> <!-- Faces Servlet --> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- Faces Servlet Mapping --> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.action</url-pattern> </servlet-mapping> </web-app>
The important change to note above is the line :<url-pattern>*.action</url-pattern>
in the ajax4jsf filter mapping. This is in lieu of the usual<servlet-name>Faces Servlet</servlet-name>
-
3. Re: Struts2 and Richfaces?
ishabalov Jun 19, 2007 7:36 PM (in response to klester)congratulations!