struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré <>
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" %>
<title><template:get name="title"/></title>
<link rel="stylesheet" type="text/css" href="toto.css"/>
<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="" 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"/>



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 template="/end.jsp">

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
Membre fondateur du LUG Béziers

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message