[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1925
  • Last Modified:

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?
0
singh101
Asked:
singh101
1 Solution
 
ioantonCommented:
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now