Announcement Announcement Module
Collapse
No announcement yet.
Unable Configure Tiles in Spring MVC Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Please post your question on Spring MVC forum. This forum is for Spring Integration project.

    Comment

    Working...
    X