Or you can use a putList tag in your Tile Definition that lists just the css
(or js) files that you need for that page and insert them into the layout
dynamically.
 (*Chris*)

On 11/28/06, Thomas Thomas <[EMAIL PROTECTED]> wrote:

I just implemented Struts Tiles in my web application.
I love the concept of seperating everything that has to do with layout and
the rest.

But it seems that I will lose some performance now :

1)
The tag tiles:insert doesn't allow to include in a static way a jsp page.
<tiles:insert attribute="header"/>

2)
Since the head tag is in the page (jsp in my case) that defines the layout
I need to put ALL the css files of the ALL the webpages.

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="layout/css/base.css"/>
<link rel="stylesheet" type="text/css" href="incl/header/css/header.css"/>
<link rel="stylesheet" type="text/css" href="incl/info/css/info.css"/>
<link rel="stylesheet" type="text/css"
href="incl/menu_top/css/menu_top.css"/>
<link rel="stylesheet" type="text/css"
href="incl/menu_left/css/menu_left.css"/>

<link rel="stylesheet" type="text/css"
href="incl/center/css/content_index.css"/>
<link rel="stylesheet" type="text/css"
href="incl/center/css/content_registration.css"/>
<link rel="stylesheet" type="text/css"
href="incl/center/css/content_chat1.css"/>
<link rel="stylesheet" type="text/css"
href="incl/center/css/content_chat2.css"/>
<link rel="stylesheet" type="text/css"
href="incl/center/css/content_profile.css"/>
<link rel="stylesheet" type="text/css"
href="incl/center/css/content_search.css"/>
<link rel="stylesheet" type="text/css"
href="incl/center/css/content_home1.css"/>
<link rel="stylesheet" type="text/css"
href="incl/center/css/content_home2.css"/>

<link rel="stylesheet" type="text/css" href="incl/footer/css/footer.css"/>

<title><bean:message key="global.title"/></title>
</head>
<body id="base_body">

    <div id="base_header">
        <tiles:insert attribute="header"/>
    </div>

    <div id="base_info">
        <tiles:insert attribute="info"/>
    </div>

    <div id="base_menu_top">
        <tiles:insert attribute="menu_top"/>
    </div>

    <div id="base_menu_left">
        <tiles:insert attribute="menu_left"/>
    </div>

    <div id="base_center">
        <tiles:insert attribute="center"/>
    </div>

    <div id="base_footer">
        <tiles:insert attribute="footer"/>
    </div>

</body>
</html>


Reply via email to