Using JSTL for JSP Custom Tag Boolean Attributes

C

Crowther

Hello Folks,

I'm having a real difficult time using JSTL to access Boolean values
as input to JSP Custom Tag Boolean attributes, and I was hoping that
someone here could help me.

I have a JSP Custom Tag defined for a navigation topic within a jsp
page that looks like:

<navigationTopic active="${ResponseBean.active}" uri="here" />

Where ResponseBean.active evaluates to ResponseBean.getActive(), which
returns a Boolean. The active attribute for the navigationTopic
custom tag is also Boolean. Within the custom tag, I am making a call
to the ExpressionEvaluatorManager in the form of:

ExpressionEvaluatorManager.evaluate("active", active.toString(),
Boolean.class, this, pageContext);

No matter what the value of active (true or false), it always
evaluates to false, pre and post validation. Changing the use of
Boolean to the primitive boolean also yields the same result. If I
use active="%= ResponseBean.getActive() %", I can retrieve the proper
value. I really want my users to be able to use JSTL; is there
something that I am doing wrong? Is there a limitation of JSTL that
would prohibit me from using Boolean evaluations for JSP custom tag
attributes?

Thanks in advance for your consideration,

- Crowther
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top