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

  • SEARCH
  • Home
  • 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 6239981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:29:06+00:00 2026-05-24T11:29:06+00:00

I have a project setup using Spring 3, Apache Tiles 2 and Maven. Before

  • 0

I have a project setup using Spring 3, Apache Tiles 2 and Maven.
Before I implement Tiles I was using the messages.properties file to dynamically populate the titles for a webpage (The part that appears between the head and title tags). The reason for this was to allow localization in the future. However since I’ve integrated tiles, the tiles.xml file seems to control the titles for my page.

Is there a way to change this so the page title comes from messages.properties for each jsp I use as the body of a page?

tiles.xml is:

 <definition name="base.definition" template="/WEB-INF/views/layouts/layout.jsp">
    <put-attribute name="title" value="" />
    <put-attribute name="header" value="/WEB-INF/views/includes/header.jsp" />
    <put-attribute name="menu" value="/WEB-INF/views/includes/menu.jsp" />
    <put-attribute name="body" value="" />
    <put-attribute name="footer" value="/WEB-INF/views/includes/footer.jsp" />
</definition>

<definition name="home" extends="base.definition">
    <put-attribute name="title" value="Welcome from Tile" />
    <put-attribute name="body" value="/WEB-INF/views/home.jsp" />
</definition>

<definition name="new-deal-input" extends="base.definition">
    <put-attribute name="title" value="New Deal" />
    <put-attribute name="body" value="/WEB-INF/views/new-deal-input.jsp" />
</definition>

Where you see “Welcome from Tile” or “New Deal” as the title I would rather that this message comes from a messages.properties. I’ve tried putting the message in the title tags on the “body” page to no avail.

The project is setup on GitHub, you can take a look at this URL: Group-Deal-Clone

  • 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-24T11:29:07+00:00Added an answer on May 24, 2026 at 11:29 am

    You can put springs message key to tiles title attribute.

    <definition name="home" extends="base.definition">
        <put-attribute name="title" value="message.key.welcome.text" />
        <put-attribute name="body" value="/WEB-INF/views/home.jsp" />
    </definition>  
    

    and use it in jsp something like this

         <c:set var="titleKey">
            <tiles:insertAttribute name="title" ignore="true" />
        </c:set>
        <title><spring:message key="${titleKey}" /></title>
    

    I don’t have right now tiles + spring project on hands so I can’t check is syntax 100% correct but I have use this approach before.

    And of course you could do something like this to get per page title

    <title><spring:message key="welcome.${titleKey}"/></title>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a multi module Spring project that I set up using Maven: my-root
I have a project using .Net 4.0, VS 2010 and Spring 1.3. Before and
I have created a setup project using Visual Studio 2008. After the application is
I have created a custom dialog for Visual Studio Setup Project using the steps
I'm using Visual Studio 2008 and have created a setup project for my application.
Summary : I have a project using GNU Autotools. I have a pot file.
This is my first serious project using NHibernate and I have setup log4net to
I have a Spring-Roo project set up using Eclipse link for my JPA persistence
I have a java project using Spring 3.0 , JPA 2.0 with MyEclipse IDE
I'm working with a project that is setup using the standard Maven directory structure

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.