views:

56

answers:

1

Hi therem

I've got the following mapping

<!-- URL Mapping  -->
    <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="mappings">
            <props>
                <prop key="/computing">computingController</prop>
                <prop key="/computing/login">computingLoginController</prop>
            </props>
        </property>
    </bean>

Unfortunately, if I open the URL http://localhost:8080/sc2-master/computing/login I get the following error:

15.09.2010 16:43:19 org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNUNG: No mapping found for HTTP request with URI [/sc2-master/computing/login] in DispatcherServlet with name 'computing'

My servlet is defined as follows:

<servlet>
        <servlet-name>computing</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>computing</servlet-name>
        <url-pattern>/computing/*</url-pattern>
    </servlet-mapping>

I cannot figure out where the mistake is, but I guess it's a simple problem ...

Thanks for your help!

Heinrich

+1  A: 

Try pointing your browser at http://localhost:8080/sc2-master/computing/computing/login

The URL is based on the Web application name, followed by the url-pattern, followed by the request mapping from SimpleUrlHandlerMapping.

In this case, your Web app is /sc2-master, your url-pattern appends /computing, and your SimpleUrlHandlerMapping mapping adds another /computing followed by /login.

James Earl Douglas