Hi guys, I have to include a page depending on a certain situation. For example, if the user is logged in... Include page A, if not... Include page B. I was wondering if the username or userid stored in a session scoped variable is enough for this task(this is what I've always been doing) or would it be better if I used the session ID and store it in a session scoped variable instead?
Is this page only going to work on authenticated pages, or will public pages, where the userid may not be available, access this page.
Think longterm and flexibility. What happens when that id comes back as null?
I don't mind putting a flag into the session. That seems somewhat innocuous.
Joined: Sep 18, 2005
That script works on every part of the page... Only that the login screen(table) is replaced by the usermenu when the user is already logged in. What could be a better solution then? That script is inside a file called leftpanel.jsp and leftpanel.jsp is also included in some JSP's liek this...