IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Spring Web Java Discussion :

[Spring webflow] null _flowId


Sujet :

Spring Web Java

  1. #1
    Futur Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    3
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 3
    Par défaut [Spring webflow] null _flowId
    Salut,

    merci par avance de l aide que vous pourrez m apporter.

    voici l erreur que j obtiens en essayant d acceder a un flow :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    The requestPathInfo is null: unable to extract flow definition id or flow execution key
    mon web.xml

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    	version="2.4">
     
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>
    			/WEB-INF/config/application-layer-config.xml
    		</param-value>
    	</context-param>
     
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
     
    	<servlet>
    		<servlet-name>demo</servlet-name>
    		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value>
    				/WEB-INF/config/web-application-config.xml
    			</param-value>
    		</init-param>
    	</servlet>
     
    	<servlet-mapping>
    		<servlet-name>demo</servlet-name>
    		<url-pattern>*.htm</url-pattern>
    	</servlet-mapping>
     
    	<welcome-file-list>
    		<welcome-file>index.jsp</welcome-file>
    	</welcome-file-list>
     
    </web-app>
    web-application-config.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    <?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:web="http://www.springframework.org/schema/webflow-config"
           xsi:schemaLocation="
               http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
               http://www.springframework.org/schema/webflow-config
               http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">
     
    	<bean name="/demo.htm" class="org.springframework.webflow.mvc.FlowController">
    		<property name="flowExecutor" ref="flowExecutor"/>
    	</bean>
     
    	<web:flow-executor id="flowExecutor" flow-registry="flowRegistry"/>
     
    	<web:flow-registry id="flowRegistry">
    		<web:flow-location path="/WEB-INF/flow/main-flow.xml"/>
    	</web:flow-registry>
     
    	<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    		<property name="prefix" value="/WEB-INF/jsp/"/>
    		<property name="suffix" value=".jsp"/>
    	</bean>
     
    </beans>
    main-flow.xml

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    <?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="start" />
     
    	<view-state id="start">
    		<transition on="go" to="Page2State" />
    	</view-state>
    	<view-state id="Page3State" view="page3">
    		<transition on="back" to="Page2State" />
    	</view-state>
    	<view-state id="Page2State" view="page2">
    		<transition on="go" to="Page3State" />
    		<transition on="back" to="start" />
    	</view-state>
     
    </flow>
    ma page de test lance le flow de cette maniere :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <a href="demo.htm?_flowId=main-flow">go to Page2</a>
    Merci encore de votre aide

  2. #2
    Membre confirmé

    Profil pro
    Inscrit en
    Décembre 2002
    Messages
    120
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : Belgique

    Informations forums :
    Inscription : Décembre 2002
    Messages : 120
    Par défaut
    Je débute dans spring, mais je suis deja étonné que dans ton start state tu ais une transition on go.

    En fait la transition si je ne me trompe pas est lancée par un event (Retour par controlleur (Success, Error, ...) ou par l'appui sur un bouton)

    Dans ce cas ci, j'ai l'impresssion qu'il faudrait que tu ais un bouton avec comme name _eventId_go

    moi je changerais cela déja :
    <start-state idref="start" />
    par
    <start-state idref="Page3State" />

  3. #3
    Futur Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    3
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 3
    Par défaut
    Citation Envoyé par cameleon2002 Voir le message
    Je débute dans spring, mais je suis deja étonné que dans ton start state tu ais une transition on go.

    En fait la transition si je ne me trompe pas est lancée par un event (Retour par controlleur (Success, Error, ...) ou par l'appui sur un bouton)

    Dans ce cas ci, j'ai l'impresssion qu'il faudrait que tu ais un bouton avec comme name _eventId_go

    moi je changerais cela déja :
    <start-state idref="start" />
    par
    <start-state idref="Page3State" />

    non non rien a voir ...

    en fait c etait les jars qui n etaient pas bon.

    en utilisant spring webflow 1.0.5. ca marche.. mon flow est le suivant :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    <?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="Page1State" />
     
    	<view-state id="Page1State" view="page1">
    		<render-actions>
    			<action bean="pageAction" method="execute" name="log" />
    		</render-actions>
    		<transition on="go" to="Page2State" />
    	</view-state>
     
    	<action-state id="standAloneAction">
    		<action bean="standAloneAction" method="execute"
    			name="standAloneLog" />
    		<transition on="standAloneLog.success" to="Page1State" />
    	</action-state>
     
    	<view-state id="Page2State" view="page2">
    		<render-actions>
    			<action bean="pageAction" method="execute" name="log" />
    		</render-actions>
    		<transition on="go" to="Page3State" />
    		<transition on="back" to="standAloneAction" />
    	</view-state>
     
    	<view-state id="Page3State" view="page3">
    		<render-actions>
    			<action bean="pageAction" method="execute" name="log" />
    		</render-actions>
    		<transition on="back" to="isValueTooHigh" />
    	</view-state>
     
    	<decision-state id="isValueTooHigh">
    		<if test="${flowScope.value &gt; 100}" then="resetValueAction"
    			else="Page2State" />
    	</decision-state>
     
    	<action-state id="resetValueAction">
    		<action bean="resetAction" method="execute" name="reset" />
    		<transition on="reset.success" to="Page1State" />
    	</action-state>
     
    	<import resource="actions-beans.xml" />
     
    </flow>

Discussions similaires

  1. Spring WebFlow - instances de flow en cours
    Par MisterHobbes dans le forum Spring
    Réponses: 0
    Dernier message: 01/03/2009, 14h07
  2. [Spring webflow] pb de validations
    Par raj dans le forum Spring Web
    Réponses: 0
    Dernier message: 29/01/2009, 15h59
  3. [Spring Webflow] Mapping sur une liste d'objet
    Par quilovni dans le forum Spring Web
    Réponses: 1
    Dernier message: 30/05/2008, 15h38
  4. [Spring Webflow] Afficher les erreurs
    Par cameleon2002 dans le forum Spring Web
    Réponses: 2
    Dernier message: 22/04/2008, 09h19
  5. [Spring WEBFLOW] Récupération des attributs
    Par cameleon2002 dans le forum Spring Web
    Réponses: 1
    Dernier message: 18/03/2008, 11h02

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo