Results 1 to 2 of 2

Thread: Unable Configure Tiles in Spring MVC

  1. #1
    Join Date
    May 2011
    Posts
    2

    Default Unable Configure Tiles in Spring MVC

    Hi All,


    Im configuring spring mvc with tiles but unable to configure it. Would you please suggest me that If Im wrong anywhere in the config files in below.

    Actually Im calling tiles template from AuthenticationProcessingFilter(I am using spring security in my application) when user provide correct credentials.


    The below is from spring security config files:-
    -----------------------------------------
    <bean id="authenticationProcessingFilter"
    class="org.acegisecurity.ui.webapp.AuthenticationP rocessingFilter">
    <property name="filterProcessesUrl" value="/j_acegi_security_check" />
    <property name="authenticationFailureUrl" value="/Failure.jsp?login_error=1" />
    <property name="defaultTargetUrl" value="/WEB-INF/jsp/template.jsp" />
    <property name="authenticationManager" ref="authenticationManager" />




    The below is from tiles definition file:-
    ---------------------------------------

    <definition name="template" page="/WEB-INF/jsp/template.jsp">
    <put-attribute name="title" value="Friday Technology" />
    <put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
    <put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" />
    <put-attribute name="body" value="/WEB-INF/jsp/body.jsp" />
    <put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" />
    </definition>
    </bean>




    The below is from spring config file to load definition files:-
    -----------------------------------------------

    <bean id="tilesConfigurer"
    class="org.springframework.web.servlet.view.tiles2 .TilesConfigurer">
    <property name="definitions">
    <list>
    <value>/WEB-INF/config/tiles/spring-tiles-definitions-config.xml
    </value>
    </list>
    </property>
    </bean>




    The below code is for view resolver and handler and controller:-
    ------------------------------------------------------------

    <bean id="viewResolver"
    class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
    <property name="viewClass"
    value="org.springframework.web.servlet.view.tiles. TilesJstlView" />
    <property name="prefix" value="/WEB-INF/jsp/" />
    <property name="suffix" value=".jsp" />
    </bean>


    <!--<bean id="viewResolver2" class="org.springframework.web.servlet.view.UrlBas edViewResolver">
    <property name="requestContextAttribute" value="requestContext" /> <property
    name="viewClass" value="org.springframework.web.servlet.view.tiles2 .TilesView"
    /> </bean> -->
    <bean id="urlMapping"
    class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="/template.jsp">templateController</prop>
    </props>
    </property>
    </bean>

    <bean id="templateController" class="org.friday.core.controller.HomeController" />


    Im really thank full to you if you provide some info to fix this issue.

    And Thanks in advance..!

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Please post your question on Spring MVC forum. This forum is for Spring Integration project.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •