Announcement Announcement Module
Collapse
No announcement yet.
spring message i18n problem with spring mvc + jsp + tiles Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring message i18n problem with spring mvc + jsp + tiles

    ----layout----
    <tiles-definitions>
    <definition name="default" template="/WEB-
    INF/views/layout/default.jsp">
    <put-attribute name="header" value="/WEB-
    INF/views/layout/header.jsp" />
    <put-attribute name="footer" value="/WEB-
    INF/views/layout/footer.jsp" />
    </definition>
    </tiles-definitions>

    <tiles-definitions>
    <definition extends="default" name="access/login">
    <put-attribute name="body" value="/WEB-
    INF/views/access/login.jsp" />
    </definition>
    </tiles-definitions>

    ----default.jsp----
    <head>
    <title><spring:message code="title" arguments="${title}"
    />
    </title>
    </head>
    <body>
    <tiles:insertAttribute name="header" ignore="true" />
    <tiles:insertAttribute name="body" />
    <tiles:insertAttribute name="footer" ignore="true" />
    </body>

    ----login.jsp----
    <spring:message code="title.login" var="title" />

    ----properties----
    title = {0}CompanyName
    title.login = Login -

    There is a problem. In the page "login.jsp", the value of the variable "tile" cannot be transfered to the title tag in "default.jsp", exactly the code "arguments". When I visit the login url, the page's title is actually "{0}CompanyName". That's incorrect, it should be "Login - CompanyName".

    Please help.
Working...
X