You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Papper <mp...@geocities.com> on 2000/09/14 09:43:16 UTC
using JSP variables inside struts tag
I have a struts message tag as so:
<title><struts:message key="index.title"/></title>
but I want to determine the "key" for the message at run time like so:
<%!String key = "index.title";%>
<title><struts:message key="<%=key%>"/></title>
but there doesnt seem to be any way to do this any ideas? OR could I
insert another tag asthe value for the key attribute in this message tag?
Also, I would like ot be able to do the same thing in a normal JSP tag
but cannot figure out the syntax to do it there either, any ideas? -
heres the code:
instead of
<jsp:include page="name.jsp" flush="true"/>
use
<jsp:include page="<%=variablenamethatisastring%>" flush="true"/>
--
Mike Papper, E-mail: mpapp@geocities.com
Hardhat Wholesale, 180 Borica St., San Francisco, CA 94127
Tel: 510-568-7770 ext. 17, Fax: (at work) 510-568-7750