struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré <jbono...@phpfr.org>
Subject Struts template tag
Date Mon, 18 Nov 2002 16:08:06 GMT
Hello all,

i would like to use template tags.

For exemple, i will define a JSP template like this :

<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<html>
<head>
<title><template:get name="title"/></title>
<link rel="stylesheet" type="text/css" href="toto.css"/>
</head>
<body>
<template:get name="subtitle"/><br>
<template:get name="corpus"/><br>


In the using JSP, can i use bean in ApplicationResource or in request
scope in put of the template ? like this :

<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<template:insert template="/template.jsp">
	<template:put name="title" content="index.title" direct="true"/>
	<!--
		// it's like <bean:message key="index.title"/>
	-->
	<template:put name="subtitle" content="toto.name" direct="true"/>
	<!--
		// it's like <bean:write name="toto" property="name"/>
	-->
	<template:put name="corpus" content="index.corpus" direct="true"/>
	<!--
		// it's like <bean:message key="index.corpus"/>
	-->
</template:insert>

Blablabla

</body>
</html>



Must i define a template with all html page or can i use two template in
one page like this :

<template:insert template="/beginning.jsp">
	...
</template:insert>

Blablablabla

<template:insert template="/end.jsp">
	...
</template:insert>




Actualy, i use <jsp:include>, one for the beginning of the JSP and one
for the end of the JSP.

If someone can mail me a sample or help for me :)

Best regards
-- 
Jean-Baptiste Onofré (Nanthrax)
Membre fondateur de phpFR.org
http://www.phpfr.org
jbonofre@phpfr.org
Membre fondateur du LUG Béziers
http://www.lug-beziers.org
jbonofre@lug-beziers.org

--
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