Using titles and message resource cause problem

C

Chris R.

Hi,

I try to create a little web application. Therefore I created a jsp
template master like this:

<%@ page language="java"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html:html locale="true">
<head>
<html:base />
<title><tiles:getAsString name="title" /></title>
</head>
<body>

<table border="0" width="100%" height="100%" cellpadding="0px">
<tr height="20px">
<td><tiles:insert attribute="header" /></td>
</tr>
<tr>
<td class="mainTd">
<tiles:insert attribute="body" />
</td>
</tr>
</table>
</body>
</html:html>


Using this template in tiles like this:

<definition name="login.definition"
path="/pages/Login/loginmaster.jsp">
<put name="header" value="/pages/header.jsp" />
<put name="footer" value="/pages/footer.jsp" />
</definition>


<!-- Logon -->
<definition name="page.login" extends="login.definition">
<put name="title" value="Please log in" />
<put name="body" value="/pages/login/loginbody.jsp" />
</definition>


When I do like this, I am not able to change the language, but
therefore I use message resources.
I'm not able to use message resources in tiles and I can't directly
insert a title in my template, because
I don't know which site extends my master.
In loginbody.jsp for example I can use my specified message sources:
<bean:message key="page.login.title"/>


So how do you do this?

thanks
chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top