-
Jan 24th, 2013, 01:43 AM
#1
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules