Using titles and message resource cause problem

Discussion in 'Java' started by Chris R., Jan 22, 2008.

  1. Chris R.

    Chris R. Guest

    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
    Chris R., Jan 22, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vito DeCarlo

    Using Indexing Service with dynamic TITLEs

    Vito DeCarlo, Jan 24, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    400
    Vito DeCarlo
    Jan 24, 2006
  2. AndysUK

    Titles in browsers using frames

    AndysUK, Apr 3, 2005, in forum: HTML
    Replies:
    1
    Views:
    380
    Fat Sam
    Apr 3, 2005
  3. Spondishy
    Replies:
    0
    Views:
    504
    Spondishy
    Nov 10, 2006
  4. *stella*
    Replies:
    2
    Views:
    78
    *stella*
    Apr 19, 2005
  5. *stella*
    Replies:
    0
    Views:
    72
    *stella*
    Apr 17, 2005
Loading...

Share This Page