You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by John Rayburn <jr...@qualis-consulting.com> on 2001/08/10 17:11:40 UTC

setProperty Tag

To all:

I wanted to be able to use the jsp:setProperty tag in my JSP 
pages.  However, I would like to be able to set the "name", "property" and 
the "value"/"param" attributes dynamically (i.e. via JSP expressions).  I 
know that I can use:

<jsp:setProperty name="client" property="*" />

But, what if I need to do something like:

<jsp:setProperty name="client" property="<%= param.getName() %>" value="<%= 
param.getValue() %>" />

This isn't possible with jsp:setProperty because it doesn't evaluate the 
expression inside of the property attributes.  Is this possibly just the 
JSP engine implementation that I'm using (Caucho's Resin) or is this universal?

If this is universal, I would like to submit a sample setProperty tag that 
I've worked on to solve this limitation of using the jsp:setProperty 
tag.  If this problem is not universal, let me know!  If this setProperty 
tag is useful to the group, then I will finish a corresponding getProperty 
tag.  Let me know.

John Rayburn