struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Hunt <ad...@revoltingdigits.com>
Subject Re: using Constants from JSTL .....
Date Wed, 07 Jul 2004 18:12:02 GMT
Just as an addition I can do this

<jsp:useBean id="Constants" class="ie.jestate.web.Constants"/>

<c:set var="emailNotifications" value="${EMAIL_NOTIFICATIONS}"></c:set>

<c:out value="${emailNotifications.priceRangeStart}"/>
<c:out value="${emailNotifications.priceRangeEnd}"/>
<c:forEach items="${emailNotifications.urbanAreas}" var="urbanArea">
    <c:out value="${urbanArea.name}"/>
</c:forEach>

And it works fine, but really what I am trying to get here is the value 
of using Constants in
both my Actions and my ( JSTL based ) jsp's.

Perhaps this is just something that never occured to the writers of the 
JSTL spec ?

--b



Bryan Hunt wrote:

> 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 lik


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message