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
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