Announcement Announcement Module
Collapse
No announcement yet.
Tiles2 Problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tiles2 Problem

    I ran into a little problem wit tiles2.
    The error I get is:
    SEVERE: Servlet.service() for servlet dispatcher threw exception
    java.io.IOException: No request dispatcher returned for path 'null'

    Here is my config:

    Dispatcher-servlet.xml:
    Code:
        <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property name="mappings">
                <props>
                    <prop key="/index.htm">indexController</prop>
                    <prop key="/admin/addLink.htm">addLinkController</prop>
                </props>
            </property>
        </bean>
    
        <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
            <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
        </bean>
        <!-- 
            Tiles configurer
        -->
        <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
          <property name="definitions">
            <list>
              <value>/WEB-INF/tiles-config.xml</value>
            </list>
          </property>
        </bean>
    tiles-config.xml
    Code:
        <!-- Administration template -->
        <definition name="adminTemplate" page="/WEB-INF/jsp/admin/template.jsp">
            <put name="header" content="/WEB-INF/jsp/admin/header.jsp"></put>
            <put name="content" content="dummyContentPage.jsp"></put>
        </definition>
        <!-- Standard template -->
        <definition name="template">
            <!-- todo -->
        </definition>
        
        <!-- 
        WEB PAGES
        -->
        <definition name="index" extends="template">
            <put name="content" value="/WEB-INF/jsp/index.jsp" />
        </definition>
        <!--
        ADMIN PAGES
        -->
        <definition name="admin/addLink" extends="adminTemplate">
            <put name="content" value="/WEB-INF/jsp/admin/addLink.jsp"/>
        </definition>
    Thanks for the help
    Y.

  • #2
    Did this ever get solved? I'm having the exact same problem.

    Comment


    • #3
      oh...

      I have the same problem... however I need to solve it. That's why wait for reply

      Comment


      • #4
        oh yes, baby!

        Problem with struts2 which in spring 2.x.

        Code:
        <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles.TilesConfigurer">
                <property name="definitions">
                    <list>
                        <value>/WEB-INF/tiles-defs.xml</value>
                    </list>
                </property>
            </bean>
            <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
                <property name="viewClass" value="org.springframework.web.servlet.view.tiles.TilesView"/>
            </bean>
        replace usage of org.springframework.web.servlet.view.tiles2 with tiles. That's all.
        Maybe in tiles2 some another working mechanism ...

        Comment


        • #5
          Solution for using tiles2

          If you upgraded from tiles 1.x the error can be traced to the tiles definitions xml.

          try upgrading to
          Code:
          <!DOCTYPE tiles-definitions PUBLIC
                 "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
                 "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
          Adapt the definitions file and your jsps to reflect tiles2!
          cheers
          mp

          Comment


          • #6
            it works!

            Originally posted by merryploughboy View Post
            If you upgraded from tiles 1.x the error can be traced to the tiles definitions xml.

            try upgrading to
            Code:
            <!DOCTYPE tiles-definitions PUBLIC
                   "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
                   "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
            Adapt the definitions file and your jsps to reflect tiles2!
            cheers
            mp
            good call merryploughboy. moral of the story (for me at least):
            don't copy samples from 2 different websites.

            Comment


            • #7
              Great, someone has solved the similar problem I'm facing now. Thanks!

              Comment

              Working...
              X