user2971624
user2971624

Reputation: 11

Spring webflow redirection

My flow.xml is

<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:webflow="http://www.springframework.org/schema/webflow-config"
      xsi:schemaLocation="http://www.springframework.org/schema/webflow
                          http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">




    <view-state id="index"  view="/WEB-INF/jsp/index.jsp">
        <transition on="phoneEntered" to="s1"/>
    </view-state>

     <view-state id="s1"  view="/WEB-INF/jsp/ac.jsp">
        <transition on="buttonPressed" to="next"/>
    </view-state>

    <end-state id="next" view="/WEB-INF/jsp/next.jsp"/>

</flow>

my index.jsp code is

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Welcome to Spring Web MVC project</title>
    </head>

    <body>

    <form:form>

        <input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}"/>

        <input type="submit" name="_eventId_phoneEntered" value="HIT ME"/>
    </form:form>

    </body>
</html>

my spring webflow starts well.1st view state renders well but when i click submit button on index.jsp .. nothings happens

when index.jsp renders in web browser the url looks like /orderFlow.htm?execution=e2s1

please help

Upvotes: 1

Views: 848

Answers (1)

Doug Breaux
Doug Breaux

Reputation: 5105

You need the Spring form tag library defined in your JSP:

<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

You also do not need or want the hidden _flowExecutionKey parameter.

Upvotes: 0

Related Questions