this is the code I used inside all my jsp pages.
<%@ include file=”footer.jsp” %>
The problem is :
This code is used in almost every jsp pages.
<jsp:useBean id=”loginuser” class=”roomres.EmployeeBean” scope=”session”/>
Inside the footer I need to get the following information
if (loginuser.getRole()==1) { %>
<a href=”menu_admin_e.jsp”>Administration Menu</a>
<%}%>
Since I declare the bean everywhere I am not supposed to declare the bean in the footer otherwise I received “duplicate declaration error” but
if I don’t declare the bean I received loginuser not declared. So what I’m supposed to do????
If I insert this code:
<jsp:getProperty name=”loginuser” property=”role”/>
I got the information but how can I used it?
Why this one works and get the right info??
Could you help me fix this problem please.