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

  • No mapping for [..] in DispatcherServlet with name '...'

    Hello I have some troubles with a simple webapp in eclipse/tomcat.
    I report here my files:

    WEB.XML
    Code:
      <display-name>TestWeb</display-name>
      
      <servlet>
        <servlet-name>testweb</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
          <param-name>contextConfigLocation</param-name>
          <param-value></param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      
      <servlet-mapping>
        <servlet-name>testweb</servlet-name>
        <url-pattern>*.ctrl</url-pattern>
      </servlet-mapping>
      
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
      </welcome-file-list>
    TESTWEB-SERVLET.XML
    Code:
    <beans>
        <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property name="mappings">
                <props>
                    <prop key="/test.ctrl">TestController</prop>
                </props>
            </property>
        </bean>   
        <bean id = "TestController" class="TestController" />   
    </beans>
    when i start the server, everything works, but when i request test.ctrl the server console writes:
    - No mapping for [/TestWeb/test.ctrl] in DispatcherServlet with name 'testweb'

    Why?
    thanks
Working...
X