You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mississippi John Hurt <jo...@gmail.com> on 2006/06/30 03:26:38 UTC

Tiles not rendering body, footer when put <%@ taglib %> at top of body

I'm trying to get Tiles working but not much luck. I have a mainlayout,
header, body, footer. I got it so the header, body, footer render, but for
some reason the <bean:message> tags dont seem to be displaying the
ApplicationResources entries. So I put at the top of my body.jsp...

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

then, what happens is that now only the header renders. Its as if when the
Tiles processes these to lines in the body.jsp, it just stops rendering and
the html output cuts off right at that point. This is so frustrating Tiles,
I may just use jsp includes if I can't figure this out.  Anyone with ideas?
Struts is pretty frustrating too. Thanks for any help.

Re: Tiles not rendering body, footer when put <%@ taglib %> at top of body

Posted by Antonio Petrelli <br...@tariffenet.it>.
Mississippi John Hurt ha scritto:
> Its as if when the
> Tiles processes these to lines in the body.jsp, it just stops 
> rendering and
> the html output cuts off right at that point.

If it cuts off the page, then probably you got an exception. Did you 
check the console for an exception stack trace?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Tiles not rendering body, footer when put <%@ taglib %> at top of body

Posted by Mississippi John Hurt <jo...@gmail.com>.
Also, my body is internationalized. It seems if I remove the "<%@ taglib
uri=" http://struts.apache.org/tags-html" prefix="html" %>
then it displays in the foreign language fine, however by removing it my
<html:> tags don't work!!
On the otherhand, when I leave that html-taglib at the top of the body, then
only the header displays, as if the body gets cutoff right when it reads
these 2 taglib lines!!

On 6/29/06, Mississippi John Hurt <jo...@gmail.com> wrote:
>
> I'm trying to get Tiles working but not much luck. I have a mainlayout,
> header, body, footer. I got it so the header, body, footer render, but for
> some reason the <bean:message> tags dont seem to be displaying the
> ApplicationResources entries. So I put at the top of my body.jsp...
>
> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
> <%@ taglib uri=" http://struts.apache.org/tags-html" prefix="html" %>
>
> then, what happens is that now only the header renders. Its as if when the
> Tiles processes these to lines in the body.jsp, it just stops rendering
> and the html output cuts off right at that point. This is so frustrating
> Tiles, I may just use jsp includes if I can't figure this out.  Anyone with
> ideas?  Struts is pretty frustrating too. Thanks for any help.
>

Re: Tiles not rendering body, footer when put <%@ taglib %> at top of body

Posted by Mississippi John Hurt <jo...@gmail.com>.
Hi,

Here's my Tiles definition... I'm using struts 1.2.9, servlet 2.3, jdk 1.4.2
<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
       "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
<tiles-definitions>
    <!-- main definition -->
    <definition name="main" path="/jsp/mainTemplate.jsp">
        <put name="header" value="/jsp/header.jsp" />
        <put name="footer" value="/jsp/footer.jsp" />
    </definition>
    <!-- login -->
    <definition name="tiles.login" extends="main">
        <put name="title" value="login.title" />
        <put name="body" value="/jsp/loginBody.jsp" />
    </definition>

MainTemplate.jsp:
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"
%>
<html:html locale="true"/>
<head>
    <title>
        <tiles:getAsString name="title"/>
    </title>
</head>
<body>
<tiles:insert attribute="header"/>
<tiles:insert attribute="body"/>
<tiles:insert attribute="footer"/>
</body>
</html>

header.jsp: just pure html

loginBody.jsp:
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<SCRIPT language=javascript>...</SCRIPT>
<table>
<html:form>...<bean:message key="..."><html:text...><html:password...>
</table>

Thanks for any help.

On 6/29/06, David Friedman <hu...@ix.netcom.com> wrote:
>
> Can you post your tile definition and a more complete JSP for us to look
> at?
>
> Regards,
> David
>
> -----Original Message-----
> From: Mississippi John Hurt [mailto:johnhurt@gmail.com]
> Sent: Thursday, June 29, 2006 9:27 PM
> To: Struts Users Mailing List
> Subject: Tiles not rendering body, footer when put <%@ taglib %> at top
> of body
>
>
> I'm trying to get Tiles working but not much luck. I have a mainlayout,
> header, body, footer. I got it so the header, body, footer render, but for
> some reason the <bean:message> tags dont seem to be displaying the
> ApplicationResources entries. So I put at the top of my body.jsp...
>
> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
>
> then, what happens is that now only the header renders. Its as if when the
> Tiles processes these to lines in the body.jsp, it just stops rendering
> and
> the html output cuts off right at that point. This is so frustrating
> Tiles,
> I may just use jsp includes if I can't figure this out.  Anyone with
> ideas?
> Struts is pretty frustrating too. Thanks for any help.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: Tiles not rendering body, footer when put <%@ taglib %> at top of body

Posted by David Friedman <hu...@ix.netcom.com>.
Can you post your tile definition and a more complete JSP for us to look at?

Regards,
David

-----Original Message-----
From: Mississippi John Hurt [mailto:johnhurt@gmail.com]
Sent: Thursday, June 29, 2006 9:27 PM
To: Struts Users Mailing List
Subject: Tiles not rendering body, footer when put <%@ taglib %> at top
of body


I'm trying to get Tiles working but not much luck. I have a mainlayout,
header, body, footer. I got it so the header, body, footer render, but for
some reason the <bean:message> tags dont seem to be displaying the
ApplicationResources entries. So I put at the top of my body.jsp...

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

then, what happens is that now only the header renders. Its as if when the
Tiles processes these to lines in the body.jsp, it just stops rendering and
the html output cuts off right at that point. This is so frustrating Tiles,
I may just use jsp includes if I can't figure this out.  Anyone with ideas?
Struts is pretty frustrating too. Thanks for any help.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org