Spring MVC 3 and Apache Tiles 2, but no controller
I am trying to get Spring MVC 3 and Apache Tiles 2 to play nice together. I can get simple pages to display and those pages have been built with Tiles templates, but for the life of me I cannot get my controller to be called. I would appreciate any help.

`web.xml`

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee"
    		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    		xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
    	
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>/WEB-INF/spring/web-application-context.xml</param-value>
    	</context-param>
    	
    	<servlet>
    		<servlet-name>tiles</servlet-name>
    		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value></param-value>
    		</init-param>
    	</servlet>
    	
    	<servlet-mapping>
    		<servlet-name>tiles</servlet-name>
    		<url-pattern>*.html</url-pattern>
    	</servlet-mapping>
    	
    	<welcome-file-list>
    		<welcome-file>index.jsp</welcome-file>
    	</welcome-file-list>
    
    </web-app>

`web-application-context.xml`

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
                               http://www.springframework.org/schema/beans/spring-beans.xsd">
    
        <!-- Imports the configurations of the different infrastructure systems of the application -->
        <import resource="webmvc-context.xml" />
    
    </beans>

`webmvc-context.xml`

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:p="http://www.springframework.org/schema/p"
           xmlns:mvc="http://www.springframework.org/schema/mvc"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/beans 
                               http://www.springframework.org/schema/beans/spring-beans.xsd
                               http://www.springframework.org/schema/mvc
                               http://www.springframework.org/schema/mvc/spring-mvc.xsd
                               http://www.springframework.org/schema/context
            				   http://www.springframework.org/schema/context/spring-context-2.5.xsd"
    	   default-autowire="byName">
        
        <!-- Static resource mapping (css, js, images, etc) -->
        <mvc:resources mapping="/resources/**" location="/WEB-INF/resouces/" />
        
        <!-- Required stuff for autowiring of controllers -->
        <context:annotation-config />
        <context:component-scan base-package="com.tarigmaa.gem" />
        <mvc:annotation-driven/>
        <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
    	<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
    
    	<!-- Static views (no controller) -->
        <!-- <mvc:view-controller path="/index.html" /> -->
        
        <!-- Tiles initialization -->
        <bean id="tilesConfigurer"
              class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"
              p:definitions="/WEB-INF/tiles-defs/templates.xml" />
    
    	<bean id="tilesViewResolver"
    		  class="org.springframework.web.servlet.view.UrlBasedViewResolver"
    		  p:viewClass="org.springframework.web.servlet.view.tiles2.TilesView" />
    	
    	<!-- Map URLs to controllers -->
    	<bean id="urlMapping"
    		  class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    		<property name="alwaysUseFullPath" value="true" />
    		
    		<property name="mappings">
    			<props>
    				<prop key="/index.html">exampleController</prop>
    				<prop key="/index2.html">exampleController</prop>
    			</props>
    		</property>
    	</bean>
    	
    	<!-- Define the controllers -->
    	<bean id="exampleController" class="com.tarigma.GEM.HomeController" />
    
    </beans>

`com.tarigma.GEM.HomeController`

    package com.tarigma.GEM;
    
    import java.util.Locale;
    
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import org.springframework.stereotype.Controller;
    import org.springframework.ui.Model;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RequestMethod;
    
    /**
     * Handles requests for the application home page.
     */
    @Controller
    public class HomeController {
    	
    	private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
    	
    	@RequestMapping(value = "/index.html", method = RequestMethod.GET)
    	public String home(Locale locale, Model model) {
    		logger.info("Welcome from /index.html");
    		model.addAttribute ("title", "Nik");
    		return "index";
    	}
    	
    	@RequestMapping(value = "/index2.html", method = RequestMethod.GET)
    	public String home2(Locale locale, Model model) {
    		logger.info ("Welcome from /index2.html");
    		model.addAttribute("title", "Jeff");
    		return "index2";
    	}
    }

I know I have dumped a lot of code here and I apologize for that. I have been at this for days and I am running out patience. Thanks in advance.
Spring MVC 3 and Apache Tiles 2, but no controller
===

I am trying to get Spring MVC 3 and Apache Tiles 2 to play nice together. I can get simple pages to display and those pages have been built with Tiles templates, but for the life of me I cannot get my controller to be called. I would appreciate any help.

`web.xml`

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee"
    		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    		xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
    	
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>/WEB-INF/spring/web-application-context.xml</param-value>
    	</context-param>
    	
    	<servlet>
    		<servlet-name>tiles</servlet-name>
    		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value></param-value>
    		</init-param>
    	</servlet>
    	
    	<servlet-mapping>
    		<servlet-name>tiles</servlet-name>
    		<url-pattern>*.html</url-pattern>
    	</servlet-mapping>
    	
    	<welcome-file-list>
    		<welcome-file>index.jsp</welcome-file>
    	</welcome-file-list>
    
    </web-app>

`web-application-context.xml`

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
                               http://www.springframework.org/schema/beans/spring-beans.xsd">
    
        <!-- Imports the configurations of the different infrastructure systems of the application -->
        <import resource="webmvc-context.xml" />
    
    </beans>

`webmvc-context.xml`

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:p="http://www.springframework.org/schema/p"
           xmlns:mvc="http://www.springframework.org/schema/mvc"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/beans 
                               http://www.springframework.org/schema/beans/spring-beans.xsd
                               http://www.springframework.org/schema/mvc
                               http://www.springframework.org/schema/mvc/spring-mvc.xsd
                               http://www.springframework.org/schema/context
            				   http://www.springframework.org/schema/context/spring-context-2.5.xsd"
    	   default-autowire="byName">
        
        <!-- Static resource mapping (css, js, images, etc) -->
        <mvc:resources mapping="/resources/**" location="/WEB-INF/resouces/" />
        
        <!-- Required stuff for autowiring of controllers -->
        <context:annotation-config />
        <context:component-scan base-package="com.tarigmaa.gem" />
        <mvc:annotation-driven/>
        <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
    	<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
    
    	<!-- Static views (no controller) -->
        <!-- <mvc:view-controller path="/index.html" /> -->
        
        <!-- Tiles initialization -->
        <bean id="tilesConfigurer"
              class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"
              p:definitions="/WEB-INF/tiles-defs/templates.xml" />
    
    	<bean id="tilesViewResolver"
    		  class="org.springframework.web.servlet.view.UrlBasedViewResolver"
    		  p:viewClass="org.springframework.web.servlet.view.tiles2.TilesView" />
    	
    	<!-- Map URLs to controllers -->
    	<bean id="urlMapping"
    		  class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    		<property name="alwaysUseFullPath" value="true" />
    		
    		<property name="mappings">
    			<props>
    				<prop key="/index.html">exampleController</prop>
    				<prop key="/index2.html">exampleController</prop>
    			</props>
    		</property>
    	</bean>
    	
    	<!-- Define the controllers -->
    	<bean id="exampleController" class="com.tarigma.GEM.HomeController" />
    
    </beans>

`com.tarigma.GEM.HomeController`

    package com.tarigma.GEM;
    
    import java.util.Locale;
    
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import org.springframework.stereotype.Controller;
    import org.springframework.ui.Model;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RequestMethod;
    
    /**
     * Handles requests for the application home page.
     */
    @Controller
    public class HomeController {
    	
    	private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
    	
    	@RequestMapping(value = "/index.html", method = RequestMethod.GET)
    	public String home(Locale locale, Model model) {
    		logger.info("Welcome from /index.html");
    		model.addAttribute ("title", "Nik");
    		return "index";
    	}
    	
    	@RequestMapping(value = "/index2.html", method = RequestMethod.GET)
    	public String home2(Locale locale, Model model) {
    		logger.info ("Welcome from /index2.html");
    		model.addAttribute("title", "Jeff");
    		return "index2";
    	}
    }

I know I have dumped a lot of code here and I apologize for that. I have been at this for days and I am running out patience. Thanks in advance.