struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: S2 : Checking constants within JSP
Date Sun, 03 Feb 2008 02:57:36 GMT
--- j alex <strutstwouser@gmail.com> wrote:
> <s:if test="myapp.appCode == @com.abc.util.AppConstants@APPLICATION_CODE">
> 
> but this doesn't look clean ; is there a way to get rid of the @
> com.abc.util.AppConstants [import?]

No; that's how OGNL accesses static data (and it's much cleaner than the way
we have to do it with JSP 2.0, IIRC).

Another option is to expose a static property by setting an action property
to the static value, but IMO that's more trouble than it's worth.

Dave



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


Mime
View raw message