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

  • No mapping for [...]

    I'm using SWF-PR3 and Spring-1.2.1

    Tomcat is giving me a: '2005-06-02 09:30:51,823 WARN [org.springframework.web.servlet.PageNotFound] - <No mapping for [/import/import.htm] in DispatcherServlet with name 'import'>'

    import-flow.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE webflow PUBLIC "-//SPRING//DTD WEBFLOW//EN"
    	"http&#58;//www.springframework.org/dtd/spring-webflow.dtd">
    	
    <webflow id="import" start-state="uploadFile">
    	<view-state id="uploadFile" view="import.chooseFile">
    		<transition on="submit" to="processFile" />
    	</view-state>
    </webflow>
    import-servlet.xml
    Code:
    	<bean name="/import.htm" class="org.springframework.web.flow.mvc.FlowController">
    		<property name="flow">
    			<ref bean="importFlow"/>
    		</property>
    	</bean>
    
    	<bean id="importFlow" class="org.springframework.web.flow.config.XmlFlowFactoryBean">
    		<property name="location" value="/WEB-INF/flows/import-flow.xml"/>
    	</bean>
    I'm also using a org.springframework.web.servlet.view.ResourceBundl eViewResolver to resolve views.

    Code:
    import.chooseFile.class=org.springframework.web.servlet.view.JstlView
    import.chooseFile.url=/WEB-INF/jsp/import/findFile.jsp
    Any pointers would be appreciated.

  • #2
    I got this to work, although I'm not clear on why this mapping is required.

    Solution:
    Code:
        <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property name="mappings">
                <props>
                    &#91;...&#93;
                    <prop key="/import.htm">/import.htm</prop>
                </props>
            </property>
        </bean>

    Comment


    • #3
      This is a Spring MVC handler mapping issue, not a web flow issue. The "BeanNameUrlHandlerMapping" strategy is the default if not you don't define one explicity in your servlet application context. However here it looks like you're definining a SimpleUrlHandlerMapping instance explicitly. I'd try adding an explicit BeanNameUrlHandlerMapping instance to see if that solves your problem.

      Keith

      Comment

      Working...
      X