struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Hunt <>
Subject using Constants from JSTL .....
Date Wed, 07 Jul 2004 18:01:19 GMT
Ok, tearing my hair out right now and extremely confused.

If you look at the Java Technology Forums you will see a rather nice 
little pattern that
someone called evnafets has created, it allows you to use a single 
Constants class
both in your Actions and in your JSP pages ...

It uses reflection to add it's static final members to a map which can 
then be accessed by JSTL like so
<c:out value="${Constants.FOR_RENTAL_PROPERTIES_SELECTION}"/>

The address is 

This works with a lot of stuff but the jstl and struts tags seem to be a 
little inconsistent in their behaviors.

For example this works ...

<html:select property="propertyTypes" multiple="true">
name="${Constants.PROPERTY_TYPES_SET}" value="id" label="name"/>

But for some reason ( my stupidity and the time of the evening ) I 
cannot get this to work.
<c:set var="emailNotifications" 
<c:out value="${emailNotifications.priceRangeStart}"/>

or like this

<c:set var="emailNotifications" 
<c:out value="${emailNotifications.priceRangeStart}"/>

I'm starting to feel like I'm back in my Perl days again .... Is there a 
way that I can dereference these
beans or do I have to use sloppy string literals in my jstl code ?

Any suggestions or am I just stupid to want to do this ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message