Solved

How to refer to a constant using JSTL

Posted on 2010-11-11
1
1,738 Views
Last Modified: 2012-05-10
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
Comment
Question by:singh101
1 Comment
 
LVL 9

Accepted Solution

by:
ioanton earned 500 total points
Comment Utility
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
twoTwo  challenge 35 86
scoresIncreasing challenge 10 57
java continue statement 10 71
Modeling a class in java 5 31
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now