Announcement Announcement Module
Collapse
No announcement yet.
flowExecutionUrl is not framing properly in the jsp Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • flowExecutionUrl is not framing properly in the jsp

    am newbie to spring webflow.
    i understood the following things about spring webflow.during server start up following things will be done.

    Please let me know am i correct or not?

    1.first it loads web.xml
    2.then loads sampleflow-config.xml
    3.it will looks flow-registry and loads sample.xml
    4.it looks for start-state and loads the "pages/sample.jsp"(am not sure here;what will happen if i mention wrong spelled jsp");

    now the problem is when i hit this url(http://localhost:8080/Sample/pages/sample.jsp) am getting the page but when i hover on proceed link am not seeing proper flowExecutionUrl ;

    its coming like this http://localhost:8080/Sample/pages/&_eventId=proceed.

    when i click this link am getting page not found.(The requested resource (/Sample/pages/&_eventId=proceed) is not available.)

    where am i missing??

    Code:
    web.xml
    ********
    
    <?xml version="1.0" encoding="UTF-8"?>
    
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    
    <web-app id="WebApp_1290589321845">
    
        <display-name>Sample</display-name>
    
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/sampleflow-config.xml</param-value>
        </context-param>
        
       
    
        <listener>
            <listener-class>
                org.springframework.web.context.ContextLoaderListener
            </listener-class>
        </listener>
                 
                  <servlet>
    		         <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> 
    		         <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 
    		   </servlet>
    
    		    <servlet-mapping> 
    		    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    			<url-pattern>/Sample/*</url-pattern>
    		    </servlet-mapping> 
      
    </web-app>
    
    sampleflow-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" />
            <property name="defaultFlowId" value="/WEB-INF/sample.xml" />
        </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/sample.xml" />
        </flow:registry>
    
      
         <bean id="SampleAction" class="com.sample.SampleAction">
        </bean>
    
    </beans>
    
    sample.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="enter" />
         
        <view-state id="enter" view="pages/sample.jsp"> 
         <transition on="proceed" to="saveapp" /> 
       </view-state> 
    
         <action-state id="saveapp">
            <action bean="SampleAction" method="generateCode" />
            <transition on="success" to="applicationPage" />
        </action-state>
    
        <view-state id="applicationPage" view="pages/application.jsp"> 
       </view-state> 
    
    
         </flow>
    
    sample.jsp
    ************
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
     <HEAD>
      <TITLE> New Document </TITLE>
    
     <BODY>
      <a href="${flowExecutionUrl}&_eventId=proceed">Proceed</a>
     </BODY>
    </HTML>
Working...
X