struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "j alex" <strutstwou...@gmail.com>
Subject S2 : Checking constants within JSP
Date Sun, 03 Feb 2008 02:47:44 GMT
Hi,

What's the best way to check constants in jsp using the s:if tag.

I've constants defined in a file like :

public class AppConstants {

    public static final String APPLICATION_CODE = "MYAPP";

    public static final String APPLICATION_VERSION = "1.2";

Now, in the JSP we need to use these constants within an s:if

Currently, i'm using

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

Thanks,
Joseph

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message