Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security Check on Every Page

Status
Not open for further replies.

fatcodeguy

Programmer
Feb 25, 2002
281
CA
Hi,

I perform a security check on every page to check if a user is logged in, and what his/her access is. If they haven't logged in, or don't have access, it redirects them to the login page.

Is there another way to do this (like have a servlet or something check for it) instead of having the scriptlet on every page? I'm using Struts, is there a better way using the framework?

Thanks
 
The easiest way in your situation IMO would be to have a custom tag that checks login status, much like what I suspect you have alreay.

How you check that status is up to your - URL, cookie or session ...

--------------------------------------------------
Free Database Connection Pooling Software
 
i don't use struts so i'm not that familiar, but if i understand correctly, you have an action servlet that processes each request and sends to the appropriate view? just add your security check in the action servlet, or perhaps make a security filter



=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top