No mapping found using Spring3 MVC + Maven2 on GAE

I'm having a weird problem trying to integrate Spring MVC and Maven into a Google AppEngine web application.

This is my web.xml

 <servlet>  
        <servlet-name>dispatcher</servlet-name>  
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>  
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                /WEB-INF/spring/webmvc-config.xml
            </param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>  
   </servlet>  

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

this is my springmvc config file

<context:annotation-config />

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

<mvc:annotation-driven/>

<bean id="viewResolver"  
        class="org.springframework.web.servlet.view.InternalResourceViewResolver"  
            p:prefix="/WEB-INF/jsp/view/"   
                p:suffix=".jsp"
                    p:viewClass="org.springframework.web.servlet.view.JstlView"   />  

this is my controller:

@Controller
@RequestMapping(value = "/hello")
public class HelloController {
     @RequestMapping(method = RequestMethod.GET)  
     public String helloGet(ModelMap map) {  
            map.put("name", "seb!");  
            return "hello";  
     }  
}

and this is my view located in webapp / WEB-INF / jsp / view / hello.jsp

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Hello Controller</title>
    </head>
    <body>
        <h1>Hello ${name}!</h1>
    </body>
</html>

and this my pom contains dependencies on SpringMVC 3.0.3, servlet-api 2.5, jstl 1.2

I keep getting

WARNING: No mapping found for HTTP request with URI [/WEB-INF/jsp/view/hello.jsp] in DispatcherServlet with name 'dispatcher'

when i hit localhost: 8080 / hello and i cant figure out why. Is it because of GAE or am I missing something in some configuration?

Update : If I send the URL from / app / * to Spring Dispatcher, changing my web.xml as follows:

<servlet-mapping>  
      <servlet-name>dispatcher</servlet-name>  
      <url-pattern>/app/*</url-pattern>  
   </servlet-mapping>`

it will work, but I just want to use the landing pages and use the application root

+2
1

. , , . , /app/* /*.

/app URL- . , URL.

web.xml:

<filter>
    <filter-name>urlRewriteFilter</filter-name>
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>urlRewriteFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

urlrewrite.xml:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"
        "http://tuckey.org/res/dtds/urlrewrite3.0.dtd">
<urlrewrite default-match-type="wildcard">
    <rule>
        <from>/</from>
        <to>/app/</to>
    </rule>
    <rule>
        <from>/_ah/**</from>
        <to>/_ah/$1</to>
    </rule>
    <rule>
        <from>/**</from>
        <to>/app/$1</to>
    </rule>
    <outbound-rule>
        <from>/_ah/**</from>
        <to>/_ah/$1</to>
    </outbound-rule>
    <outbound-rule>
        <from>/app/**</from>
        <to>/$1</to>
    </outbound-rule>
</urlrewrite>
+3

All Articles