Announcement Announcement Module
Collapse
No announcement yet.
Error using <bean-import> tag in Spring Webflow 2.0.8 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error using <bean-import> tag in Spring Webflow 2.0.8

    Hi All

    I am trying to import certain beans that I have defined in my application context into my flow definition using the bean import tag <bean-import resource="path to my application context"/>. However, I keep getting the error

    Code:
     org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting 
    with element 'input'. One of '{"http://www.springframework.org/schema/webflow":bean-import}'
     is expected.
    .

    I dont understand why I keep getting this error. I have checked the web flow schema and the location of the <bean-import> tag is correct. Does anyone have any ideas why this is

    Here is my flow definition

    Code:
    <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-2.0.xsd">
    	
    	
    	<bean-import resource="EJB-application-context.xml"/>
    	<input name ="userBean" value="flowScope.userBean"/>
    ...
    </flow>
    I am using Spring 3 with Web flow 2.0.8
    Thanks
    Last edited by quophyie; Feb 26th, 2010, 09:34 AM.

  • #2
    I've resolved this problem. the bean-import tag should haveb een used like this

    Code:
    <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-2.0.xsd">
    	
    	
    	<input name ="userBean" value="flowScope.userBean"/>
    ...
    
    
    	<bean-import resource="EJB-application-context.xml"/>
    </flow>
    It should be the last tag in the flow definition

    Comment

    Working...
    X