Announcement Announcement Module
Collapse
No announcement yet.
No mapping found for HTTP request with URI [/greenhouse/WEB-INF/layouts/${currentDevi Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No mapping found for HTTP request with URI [/greenhouse/WEB-INF/layouts/${currentDevi

    I tried to execute greenhouse locally but I got:

    Code:
    org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/greenhouse/WEB-INF/layouts/${currentDevice.mobile ] in DispatcherServlet with name 'appServlet'
    I breakpointed at DispatcherServlet.doDispatch() and request.getRequestURL() showed me "http://localhost:70/greenhouse/WEB-INF/layouts/${currentDevice.mobile ", which may have come from WEB-INF/layouts/tiles.xml, which has:


    Code:
    <tiles-definitions>
    	
    	<definition name="page" templateExpression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}page.jsp">
    		<put-attribute name="header" expression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}header.jsp" />
    		<put-attribute name="footer" expression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}footer.jsp" />
    	</definition>
    	
    </tiles-definitions>
    ...so it seams that the URL hasn't been processed properly by DeviceResolverHandlerInterceptor.

  • #2
    Hmm... it's working fine for me locally off the latest from trunk. That expression capability relies on a later version of Tiles 2 that supports expressions. I take it you're not modifying the dependencies in any way?

    Keith

    Comment


    • #3
      No mapping found for HTTP request with URI [/greenhouse/WEB-INF/layouts/${currentDevi

      Keith

      I did not change any dependency.
      I'm also new to git. I think I did right. I use Helios. I installed EGit and cloned the greenhouse repository, then yet on the repository view I imported the greenhouse project from the working directory, maven resolved the dependecies and I added the project on my tomcat 6. That's it.

      Thanks for your reply.

      Comment


      • #4
        The tiles version under maven dependencies is 2.2.2.

        Comment


        • #5
          Well that's frustrating. Can you provide some more information about your environment, perhaps. Are you deploying inside an IDE, or to a standalone Tomcat 6 installation? I'd help you if I could, but I just haven't been able to reproduce the issue.

          Comment


          • #6
            Keith

            I'm deploying inside Helios.

            Thanks.

            Comment


            • #7
              Eclipse Helios, but what flavor? Do you have m2Eclipse installed? Have you tried deploying inside the latest SpringSource Tool Suite distribution, as a point of comparison?

              Keith

              Comment


              • #8
                I got this as well.

                I got the code today using:
                Code:
                $ git clone git://git.springsource.org/greenhouse/greenhouse.git
                $ cd greenhouse
                then I launched it with:
                Code:
                $ mvn tomcat:run
                If I remove the ternary operation in tiles.xml it works.
                Code:
                <tiles-definitions>
                	
                	<!-- definition name="page" templateExpression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}page.jsp">
                		<put-attribute name="header" expression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}header.jsp" />
                		<put-attribute name="footer" expression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}footer.jsp" />
                	</definition-->
                	<definition name="page" templateExpression="/WEB-INF/layouts/standard/page.jsp">
                		<put-attribute name="header" expression="/WEB-INF/layouts/standard/header.jsp" />
                		<put-attribute name="footer" expression="/WEB-INF/layouts/standard/footer.jsp" />
                	</definition>
                	
                </tiles-definitions>
                Environment:
                Code:
                $ mvn --version
                Apache Maven 2.2.1 (rdebian-1)
                Java version: 1.6.0_22
                Java home: /usr/lib/jvm/java-6-sun-1.6.0.22/jre
                Default locale: en_CA, platform encoding: UTF-8
                OS name: "linux" version: "2.6.32-28-generic" arch: "i386" Family: "unix"
                Hope that helps.

                Comment


                • #9
                  Interesting. It must be the version of the EL used to resolve the Tiles layout. I assume that's standard Unified EL there Tiles is using. This works fine on the latest Tomcat 6 for me, but I wonder what exact version of Tomcat you're using...

                  Keith

                  Comment


                  • #10
                    Keith,

                    I'm not sure... I'm just using what ever greenhouse specified in the pom.

                    Does this help
                    Code:
                    <plugin>
                    	<groupId>org.codehaus.mojo</groupId>
                    	<artifactId>tomcat-maven-plugin</artifactId>
                    	<version>1.0-beta-1</version>
                    </plugin>
                    Regards,
                    Waldo

                    Comment


                    • #11
                      Waldo,

                      I've run into the same problem as well, and I have to say that everything works fine provided that you use the "right" container with the right jars (el-api in this case). I solved the problem using another tomcat plugin called t7 and then adjusting the tomcat version to 6.0.28. Anyway I think that tweaking the deps in the plugin as depicted here http://mojo.codehaus.org/tomcat-mave...ersion.htmlcan solve the problem.
                      Another approach is to manually delete tomcat-plugin from your local repo and try again.

                      you can find the t7 plugin here:
                      http://code.google.com/p/t7mp/

                      HTH

                      ignazio

                      Comment


                      • #12
                        Yeah, definitely a problem with the version of EL being included by Tomcat. Even the version of Tomcat included with version 1.1 of the Maven Tomcat plugin doesn't work (which is odd, since that's 6.0.29 and should fully support JSP 2.1 which should have ternary support).

                        In any case, I updated Greenhouse to the Tomcat 7 plugin referenced above and it works.

                        To use:
                        mvn t7:run
                        Access http://localhost:8080/greenhouse-1.0.0-BUILD-SNAPSHOT/

                        Comment

                        Working...
                        X