You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Brian J. Sletten" <bs...@nova.org> on 2002/05/16 20:29:16 UTC
Parameterized Struts Templates
Does anyone know of any examples that parameterize the Struts
template taglib?
For example, I'd like to set what goes in the 'content' template section
based on a request parameter, session variable, etc.
Thanks for any pointers,
Brian
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Parameterized Struts Templates
Posted by Rajesh Kalluri manduca <ra...@manduca.com>.
Brian,
This is what i do with tiles to change a template sections u can safely
replace tiles with templates and it should work.
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/TLD/tiles.tld" prefix="tiles" %>
<% String content ="/index.html" %>
<tiles:insert page="/layouts/classicLayout.jsp" >
<tiles:put name="content" value="<=content>" />
</tiles:insert>
Note that you can put in request/session scope content variable that can be
used by the template taglibrary you can do that from your action based on
your user input. Also take a look at tiles tag library for a templating
mechanism that closely interacts with the struts frame work on the server
side.
If you look at the TLD for template taglid you will see that the value
attribute has <rtexprvalue>true</rtexprvalue>, which should help you out,
-----Original Message-----
From: Brian J. Sletten [mailto:bsletten@nova.org]
Sent: Thursday, May 16, 2002 2:29 PM
To: taglibs-user@jakarta.apache.org
Subject: Parameterized Struts Templates
Does anyone know of any examples that parameterize the Struts
template taglib?
For example, I'd like to set what goes in the 'content' template section
based on a request parameter, session variable, etc.
Thanks for any pointers,
Brian
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>