Spring MVC – No mapping found for HTTP request with URI

I'm aware that there are loads of questions on the topic but none of the solutions i found here worked for me.
I'm using Spring with Jetty 6 so i don't have a web.xml file. The mapping for the spring dispatcher servlet is set to "/" in jetty's config


<bean class="org.mortbay.jetty.servlet.ServletHolder">
    <property name="name" value="spring" />
    <property name="servlet">
        <bean class="org.springframework.web.servlet.DispatcherServlet" />
    <property name="initParameters">
            <entry key="contextConfigLocation" value="classpath:com/project/config/spring-servlet.xml" />

… mapping:

<bean class="org.mortbay.jetty.servlet.ServletMapping">
    <property name="servletName" value="spring"></property>
    <property name="pathSpec" value="/"></property>

The spring-servlet.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="..." ...>

<context:component-scan base-package="com.project.web" />
<mvc:annotation-driven />

    <property name="prefix">
    <property name="suffix">


And i have a simple controller called HelloController:

public class HelloController {

    @RequestMapping(method = RequestMethod.GET, value="/welcome")
    public String sayHello(ModelMap model){
    model.addAttribute("message", "Spring 3 MVC Hello World");
    return "hello";


Reading the logs it seem to work but i get the following error:

No mapping found for HTTP request with URI [/WEB-INF/pages/hello.jsp] in DispatcherServlet with name 'spring'

which i don't understand. it maps the "/welcome" to /WEB-INF/pages/hello.jsp but it still says page cannot be found, which is just there where it seems to look for it. I added the WEB-INF folder to the classpath but it's still the same. Do you have any idea why's that?

Solution to answer:

Are you sure the package name is correct in this?

<context:component-scan base-package="com.project.web" />