The pre-JSP 2.0 version of the JSTL can reference properties of JavaBeans, and entries of collections and maps. That's it.
If you have a bunch of constants that you might want to reference, you might consider processing a class with reflection, loading all the "static final" variables into a hashmap, keyed by the variable name. The resulting references in your JSP would look almost the same as you were intending. > -----Original Message----- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2003 7:47 AM > To: Tag Libraries Users List > Subject: Way to compare scoped value to a class constant variable? > > I'm wondering if there is a way I could compare a scoped variable to a > static constant variable that is in a class? > > For example in Const class I have some levels like: > > public static final int JVP_LEVEL = 3; > > It would be nice if in my JSP I could do (after the import up top).. > > <c:if test="${myScopedVar == Const.JVP_LEVEL}" /> > > I know I could just do .. > > <c:if test="${myScopedVar == 3}" /> > > But it is clearer in the code to use the Constant name. Is it possible > to do this somehow? > > Thanks, > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
