Announcement Announcement Module
Collapse
No announcement yet.
spring mvc mapping Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring mvc mapping

    hi,

    i am working with webflow (2.0) integrated in mvc. the flow ist comming up
    with the first page. I try to press a button that should me redirect to another page, but an http 404 error occurs.

    mapping org.springframework.web.servlet.handler.SimpleUrlH andlerMapping:
    Code:
    <prop key="/**/startFlow1.html">myController</prop>

    flow configuration
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    	<beans xmlns...spring-webflow-config-2.0.xsd">
    
    
    <bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
    
    	<property name="flowExecutor" ref="flowExecutor" />
    </bean>
    	
    <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry" />
    	
    <webflow:flow-registry id="flowRegistry">  
    	<webflow:flow-location path="/WEB-INF/jsp/startFlow1.xml" />
    </webflow:flow-registry>
    flow
    Code:
    <flow xmlns="...-webflow-2.0.xsd">
    
    
    
    	<view-state id="startFlow1" view="/WEB-INF/jsp/page1.jsp">
    		<transition on="button1" to="_page2" />
    	</view-state>
    	
    	<view-state id="_page2" view="/WEB-INF/jsp/page2.jsp">
    		<transition on="button2" to="page3" />
    		<transition on="button3" to="startFlow1" />
    	</view-state>
    
    	<end-state id="page3" />
    
    </flow>
    page 1
    Code:
    <br/>
    
    <h2>Page 1 of 3</h2>
    
    
    <form method="post" action="page1">
    		<input type="submit" id="button1" name="button1" value="Next" class="button" />
    </form>
    page 2
    Code:
    <h2>Page 2 of 3</h2>
    
    
    <form method="post" action="page2">
    	
    		<input type="submit" id="button2"  name="button2"  value="Next" class="button" />
    		<input type="submit" id="button3"  name="button3"  value="Back" class="button" />
    </form>
    page 3
    Code:
    <h2>Page 3 of 3</h2>

    Page 1 is comming up, so the mapping for page 1 is ok and the flow redirects to it.

    pressing the button1 will occur a HTTP 404 error.
    the page2 is deployed in the directory. must i define a special mapping (flowmapping) for page2 (page one will be displayed?!).

    i am sure its not a hard mistake, but i am looking now for a couple of days.
    maybe you can help me.

    thank,

    conrad

  • #2
    closed

    it's running, after fixing a couple of small problems. one of them was working without the mvc-form tag.

    Comment

    Working...
    X