tags:

views:

40

answers:

0

Possible Duplicates:
accessing constants in JSP (without scriptlet)
Reference interface constant from EL

Hi,
I am having a class which contains all the constants used in my application.
Eg:

public class AppConstants {
    public static final String USER_TYPE_ADMIN = "Administrator";
}

Now in one of my jsp page, i need to access the value of the constant USER_TYPE_ADMIN which is defined in AppConstants class using EL in JSTL tags and even I dont want to write a getter methods for the constants defined.
Eg:

<c:out value='${AppConstants.USER_TYPE_ADMIN}' />

or

<c:if test='${AppConstants.USER_TYPE_ADMIN eq "test"}' >
</c:if>

But above tags are not working.

Can anybody help me out to solve this problem?

Thanks.