struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Geary <sabrew...@earthlink.net>
Subject Re: template
Date Tue, 03 Sep 2002 02:38:48 GMT
Hi Keven,

Struts templates do not work with HTML frames; I believe that's the
cause of your problem. (If anyone has gotten them to work with frames,
please holler). When I originally developed templates, I tried to get
them to work with frames, but it was very difficult. If I remember
correctly it's because each frame creates its own request, which wreaks
havoc with templates.

That said, you really shouldn't need to resort to frames, because
templates gives you pretty much the same functionality, except for being
able to resize regions.

I don't know if Tiles (which is an extension of templates) works with
frames; my guess is that they don't, but Cedric should be able to answer
that. Cedric, are you listening?

btw, you're probably better off using Tiles or a later version of
templates. Both implementations offer similar capabilities; which you
prefer is largely a matter of taste. You can read about the later
version of templates and download the source code at:

http://www.javaworld.com/javaworld/jw-12-2001/jw-1228-jsptemplate_p.html.


david

Keven wrote:

>Hi, All:
>
>I have a template jsp called template.jsp. The content of template.jsp is:
>
><%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
>
><html>
><head>
><title><template:get name='title'/></title>
></head>
>
><frameset  rows="20%,*">
>
>  <FRAME src="<template:get name='header' flush='true'/>">
>  <FRAME src="<template:get name='content' flush='true'/>">
>
></frameset>
></html>
>
>I have another jsp file called  index.jsp which uses the template.jsp. The content of
index.jsp is:
>
><%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
>
><template:insert template='/template.jsp'>
>
>  <template:put name='title' content='Templates' direct='true'/>
>  <template:put name='header' content='/welcome.html' direct='true'/> 
>  <template:put name='content' content='/tour.html' direct='true' />
></template:insert>
>
>Whenever I tried to run it in tomcat, I got 
>"Apache Tomcat/4.0.4 - HTTP Status 404 - /welcome.html
>
>type Status report
>
>message /Welcome.html
>
>description The requested resource (/Welcome.html) is not available.
>
>"
>Apache Tomcat/4.0.4 - HTTP Status 404 - /tour.html"
>
>type Status report
>
>message /tour.html
>
>description The requested resource (/tour.html) is not available.
>
>
>
>I got the above messages in different frame.I don't know what cause the problem. Some
one knows how to fix it?
>
>Thank you very much
>
>Keven
>
>
>
>
>
>  
>



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


Mime
View raw message