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
[EMAIL PROTECTED]
Membre fondateur du LUG B�ziers
http://www.lug-beziers.org
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to