Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6225557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:51:53+00:00 2026-05-24T08:51:53+00:00

I have a web application running with Spring Webflow, Tiles and JSP. Currently all

  • 0

I have a web application running with Spring Webflow, Tiles and JSP.

Currently all pages are extending my “defaultLayout” definition (which has a banner, menu structure, footer, etc.).

In tiles definition file:

<definition name="defaultLayout" template="/WEB-INF/tiles/defaultLayout.jsp"/>

<definition name="_**.view.jsp" extends="defaultLayout">
    <put-attribute name="content" value="{1}.view.jsp"/>
</definition>

A new requirement is to have an “embedded” view (without footer/menu/etc.). I created an embedded view definition:

<definition name="embeddedLayout" template="/WEB-INF/tiles/embeddedLayout.jsp"/>
<definition name="_**.embedded.view.jsp" extends="embeddedLayout">
    <put-attribute name="content" value="{1}.view.jsp"/>
</definition>        

I have JSP files that specify the main content of a page (all named: pageName.view.jsp).

Now what I need is some way to let tiles render pageName.embedded.view.jsp (which will use embeddedLayout) instead of pageName.view.jsp based on a certain requirement (haven’t figured out that yet probably a request parameter passed in or something to that effect).

I am not too familiar with the inner workings of tiles What class can I override to change pageName.view.jsp to rather be pageName.embedded.view.jsp?

Here are my relevant Spring configuration:

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

<bean id="webflowViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
    <property name="viewResolvers">
        <bean class="org.springframework.js.ajax.AjaxUrlBasedViewResolver">
            <property name="viewClass" value="org.springframework.webflow.mvc.view.FlowAjaxTilesView"/>
            <property name="prefix" value="_"/>
        </bean>
    </property>
</bean>

Any help will be appreciated.

Tiles version: 2.2.1
Spring version: 3.0.3
Webflow version: 2.1.1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:51:54+00:00Added an answer on May 24, 2026 at 8:51 am

    In the end I did the following which solved my problem (hopefully this will help others with a similar problem):

    I decided that everything that has /embedded/ in the context path should use the embedded tile layout.

    I extended org.springframework.js.ajax.AjaxUrlBasedViewResolver to check if the incoming request (retrieved using Spring’s RequestContextHolder) contains /embedded/. If it does it changes the viewName to be whatever.embedded.view.jsp (instead of just whatever.view.jsp. It is then rendered using the embedded layout.

    This solves my problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application running on Spring Webflow with Spring Security. I have
I have a spring web application running on JBoss which is creating a csv
I have a j2ee web application running on Spring framework. I want to implement
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
We have a (non-web app) Spring application that throws a NoSuchBeanDefinitionException when running tests
I have a j2ee web application running on spring web flow using spring security.
I have a spring web application which a user can deploy on their own
I have a Spring framework based Java web application, which has been built in
I have a web application running on Java stack (Struts 2 + Spring +
I have a Wicket Web Application running in Tomcat. The application uses Spring (via

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.