You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ian Hunter <ia...@cartezia.com> on 2002/03/01 12:38:22 UTC

Templates!

Hi Folks,

I've got a problem with strut templates. The included HTML file appears
*before* the template <HTML> tag! An included text appears fine.

I'm using Jetty-3.1.3 (combined with JBoss 2.4.4)

Many thanks for any help

Ian

Heres my simple example....

TEMPLATE--------------------------------------------------------------------
------------------------------
<%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %>

<html>
  <head><title><template:get name='title'/></title></head>

  <body bgcolor='lightyellow'>
    <template:get name='title'/>
    <template:get name='sidebar'/>
  </body>

</html>
TEMPLATE--------------------------------------------------------------------
------------------------------


PAGE------------------------------------------------------------------------
---------------------------------
<%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %>

<template:insert template='/teamwarrior-template.jsp'>
  <template:put name='title'   content='Title' direct='true'/>
  <template:put name='sidebar' content='/login-sidebar.html' />
</template:insert>
PAGE------------------------------------------------------------------------
---------------------------------


FRAGMENT--------------------------------------------------------------------
----------------------------
<H1>Sidebar</H1>
FRAGMENT--------------------------------------------------------------------
----------------------------


OUTPUT
SRC-------------------------------------------------------------------------
---------------------
<h1>Sidebar</h1>

<html>
  <head><title>Title</title></head>

  <body bgcolor='lightyellow'>
    Title
  </body>
</html>
OUTPUT----------------------------------------------------------------------
-------------------------------






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>