Link to home
Start Free TrialLog in
Avatar of singh101
singh101

asked on

How to refer to a constant using JSTL

I have a java constant defined as follows:
public static final String ACCESS_ROLE="accessRole".

In a struts action class I set this attribute in a session sesssion.setAttribute(Constants.ACCESS_ROLE, "adminrole");

In my JSP I am using JSTL. How could I use JSTL to check that the attribute exists in the session, i know how to do it using the actual string value such as

<c:if test="${(sessionScope.accessRole == 'true') }" > but how would I use Constant.ACCESS_ROLE in the if expression?
ASKER CERTIFIED SOLUTION
Avatar of ioanton
ioanton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial