Or I could have a jsp page that set pageContext variables with the constant
values. I can include that page in all JSPs where i need constant values.
And then I could use those pageContext variables in EL tags.
----- Original Message -----
From: "David M. Karr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 11:18 AM
Subject: Re: rtexprvalue and EL
> >>>>> "Affan" == Affan Qureshi <[EMAIL PROTECTED]> writes:
>
> Affan> I want to do a test like this:
> Affan> <c:if test="${parameter.type == <%= ParameterBean.TEXT%>}">
> Affan> <nested:text property="value" />
> Affan> </c:if>
>
> Affan> I am comparing a value against a constant in a class but I
can't execute a
> Affan> RT expression in a <c:if > when using the EL tags. How do I
accomplish this
> Affan> in EL?
>
> Affan> Of course I can initialize pageContext variables with all the
constants and
> Affan> do EL comparisons using them. But is there another way to do
this?
>
> The EL only references javabean properties. That's what you have to work
with.
>
> Write a function which takes a class and a hashmap, and uses reflection to
> populate all the constant symbols into the hashmap. You can then
reference
> that hashmap in the EL. Either that, or use both the "c" and "c-rt" tags,
and
> use "c-rt:set" to set a scoped attribute and then "c:if" (I think that
would
> work).
>
> --
> ===================================================================
> David M. Karr ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED] ; SCJP
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>