Announcement Announcement Module
Collapse
No announcement yet.
${flowExecutionUrl} is not rendering for spring 1.x examples Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ${flowExecutionUrl} is not rendering for spring 1.x examples

    am executing flow like this.when i click proceed link its going to sample.jsp based on the actions defined in flow.xml file .but in this jsp ${flowExecutionUrl} is not coming.where am i missing??


    http://localhost:8080/&event_Id=proceed.

    its framing like this..


    below jars hav placed in classpath.
    commons-logging-1.0.4.jar
    jdom-1.0.jar
    ognl-2.6.11.jar
    spring-2.0.2.jar
    spring-mock-1.1.3.jar
    spring-webflow-1.0.5.jar


    Code:
    
    
    index.jsp
    ***********
    
    <a href="app?_flowId=sample-flow">Proceed</a>  
    
    sample.jsp
    *************
    
    
    <%@ page isELIgnored="false" %>
    
    <html>
    <head>
    <title>Insert title here</title>
    </head>
    <body>
    <form id="frm">
    <a href='${flowExecutionUrl}&_eventId=proceed'>Proceed-sample</a>
    </form>
    </body>
    </html>
    
    web.xml
    ********
       <servlet>
    		         <servlet-name>spring</servlet-name> 
    		         <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 
    		   </servlet>
    		    <servlet-mapping> 
    		    <servlet-name>spring</servlet-name>
    			<url-pattern>/app/*</url-pattern>
    		    </servlet-mapping> 
    
    webflow-config.xml
    ******************
    <?xml version="1.0" encoding="UTF-8"?>
    
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:flow="http://www.springframework.org/schema/webflow-config"
           xsi:schemaLocation="
               http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
               http://www.springframework.org/schema/webflow-config
               http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd">
    
    
        <bean name="/*" class="org.springframework.webflow.executor.mvc.FlowController">
            <property name="flowExecutor" ref="flowExecutor" />
         </bean>
    
        <!-- Launches new flow executions and resumes existing executions. -->
        <flow:executor id="flowExecutor" registry-ref="flowRegistry">
            <flow:execution-attributes>
                <flow:alwaysRedirectOnPause value="false" />
            </flow:execution-attributes>
        </flow:executor>
    
        <!-- Creates the registry of flow definitions for this application -->
        <flow:registry id="flowRegistry">
            <flow:location path="/WEB-INF/**-flow.xml" />
        </flow:registry>
    
    	<bean id="saveAction" class="com.actions.SaveAction">
        </bean>
    
    </beans>
    
    sample-flow.XML
    *******************
    <?xml version="1.0" encoding="UTF-8"?>
    
    <flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.springframework.org/schema/webflow
            http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd">
    
    
        <start-state idref="example" />
        
        <view-state id="example" view="sample">
    		<transition on="proceed" to="save"/>
    	</view-state>
    	
    	 <action-state id="save"> 
            <action bean="saveAction" method="generateCode" />
            <transition on="success" to="thanku" /> 
            </action-state>
            
            
            <view-state id="thanku" view='thanku'/> 
    
    </flow>
Working...
X