You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rick Mann <rm...@latencyzero.com> on 2001/09/19 02:20:27 UTC

Using a custom action as input to another tag's attribute?

I wrote a nifty set of custom actions (under the prefix "lz" below) that
lets me write JSP code like this:

<% int parentCatID = 1 %>

<lz:listCategories categoryID="<%= parentCatID %>">

    <a href="<ora:encodeURL url="catalog.jsp"><ora:param name="categoryID"
value="<lz:getCategoryID/>"/></ora:encodeURL>">
        <lz:getCategoryName/>
    </a>
</lz:listCategories>

Now, this works, except for the tag <lz:getCategoryID/> passed as the value
to the "value" attribute of <ora:param/>. Is it not possible to do this? I
can have a Java expression like <%= foo.doSomething() %> in there, but I was
saddened to see that putting a JSP tag in there does not seem to work.

I've tested the tag outside of the <ora:param/> tag, and it works as
expected.

The <ora:encodeURL> tag creates a URL of the form:

"catalog.jsp?categoryID=XX"

where "XX" is the value supposedly returned by <lz:getCategoryID>.

Is this not possible, or do I need to change something?

TIA,

------------------------------------------------------------
Roderick Mann               rmann @ latencyzero.com.sansspam