2013-11-09 4 views
1

Мой flow.xml являетсяSpring WebFlow Перенаправление

<?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> 

мой index.jsp код

<%@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> 

моя весна WebFlow начинает well.1st вид состояния делает хорошо, но когда я нажимаю кнопку отправки по индексу .jsp .. бездельники бывает

когда index.jsp делает в веб-браузере URL выглядит как /orderFlow.htm?execution=e2s1

пожалуйста, помогите

ответ

0

Вам нужна библиотека тегов Spring формы, определенную в вашем JSP:

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

Вы также не нуждаетесь или хотите скрытый _flowExecutionKey параметра.

Смежные вопросы