Hi i have a trouble about the configuration of Spring,Spring 3.1 WebFlow2.3, JSF (Mojarra) 2, Richfaces and Spring Security 3.1. I don't want a controller to map the login page or create a flow definition for the login page.
I configure my web.xml like this:
My web-servlet.xml like this:Code:<display-name>richfaces-application</display-name> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/root-context.xml</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> <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> </filter-mapping> <context-param> <param-name>org.richfaces.enableControlSkinning</param-name> <param-value>true</param-value> </context-param> <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>javax.faces.PROJECT_STAGE</param-name> <param-value>Development </param-value> </context-param> <context-param> <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name> <param-value>1</param-value> </context-param> <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>transportes</servlet-name> <url-pattern>/flows/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>flows/index</welcome-file> </welcome-file-list> </web-app>
and my web-flow.xml like this:Code:<beans:import resource="transportes-webflow.xml" /> <beans:bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping"> <beans:property name="flowRegistry" ref="flowRegistry" /> <beans:property name="defaultHandler"> <beans:bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" /> </beans:property> </beans:bean> <beans:bean class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <beans:property name="viewClass" value="org.springframework.faces.mvc.JsfView" /> <beans:property name="prefix" value="/WEB-INF/views/" /> <beans:property name="suffix" value=".xhtml" /> </beans:bean> <beans:bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter"> <beans:property name="flowExecutor" ref="flowExecutor" /> </beans:bean>
With this configuration all page run with the url localhost:8080/project/flows/.Code:<flow-executor id="flowExecutor"> <flow-execution-listeners> <listener ref="facesContextListener"/> <listener ref="securityFlowExecutionListener"/> </flow-execution-listeners> </flow-executor> <flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF/flows"> <flow-location-pattern value="/**/*-flow.xml" /> </flow-registry> <faces:flow-builder-services id="flowBuilderServices"/> <beans:bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener"/> <beans:bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/> </beans:beans>
When I run localhost:8080/project/flows/xxx, this map to localhost:8080/project/views/xxx and when i run localhost:8080/project/xxx/xxx this map to an swf localhost:8080/project/xxx/xxx.xml.
There is a better way to do this?, because when i change in the web.xml the url-pattern /flows/* to /app/* the page in the file view work but the spring-flow stop to work.


Reply With Quote
