I have a usability problem in my Spring webapp which uses Tiles as the view technology.
At the moment all of the pages display the same HEAD_TITLE
and the PAGE_TITLE
is page specific:
<html>
<head><title>HEAD_TITLE</title></head>
<body>
<h1>PAGE_TITLE</h1>
</body>
</html>
This is a major usability problem as the browsers history lists all different pages of the application with the same title. The reason why the HEAD_TITLE
is same for all pages is that I haven't found a reasonable way to use the PAGE_TITLE
as the HEAD_TITLE
.
In most cases the PAGE_TITLE
comes from a message bundle with <fmt:message />
tag and
some parameters are passed to it. The Tiles layout is such that the HEAD_TITLE
should be already set at that point because all pages of the webapp use the same common layout which defines the <HEAD>
elements of the pages amongst other stuff.
Any suggestions how to fix this usability problem? Should I set a "pageTitle" request attribute in my Spring controllers for all pages and use that as the PAGE_TITLE
and also as the HEAD_TITLE
? Or is it possible to somehow set the HEAD_TITLE in the page specific JSP?