How the JSF integration works is we decompose the JSF Lifecycle object into its phases and store each in a Struts 2 Interceptor. Therefore, the request enters the Struts 2 FilterDispatcher like normal, then if the action mapping includes the JSF interceptors (like it does in your example by including the "jsfStack"), the request will go through the JSF phases. The page displayed, employee.jsp, is determined using normal JSF means (taking the action name and appending a ".jsp"). Even that might be configurable, though I couldn't say for sure.
Don On 6/25/07, Jason Wyatt <[EMAIL PROTECTED]> wrote:
I'm confused as to how to integrate a third-party JSF component with our Struts 2 app. I've been able to get a the third-party example JSF page working with using one web.xml file, and our Struts 2 app works with another ordinary web.xml file, but I can't seem to get both working together using one web.xml file. The example at http://struts.apache.org/2.x/docs/javaserver-faces.html shows one way of integrating JSF with Struts 2 - by adding <interceptor-ref name="jsfStack" /> to the action definition. However, I don't really understand the example... How does the action know to go to the employee page on success? It seems to be missing something. The example code: <action name="employee" class="org.apache.struts.action2.showcase.jsf.EmployeeAction"> <interceptor-ref name="basicStack"/> <interceptor-ref name="jsfStack"/> <result name="success" type="jsf" /> <result name="index" type="redirect-action">index</result> </action> The "showcase" JSF example seems to use another way - by setting up a javax.faces.webapp.FacesServlet to process all *.action requests. This seems quite different to the documented example above, and counterintuitive... If Faces is processing the actions, then how does the struts framework get called? Thanks for any help, regards Jason ----- Falun Dafa Truth - Compassion - Forbearance A mind & body practice under persecution in China http://www.faluninfo.net --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]