I am creating an application that will have multiple pages in it, I want a user to be redirect to login page in case he isn’t authenticated already and tries to access some intermediate page.
I am developing this on jsp/servlet, but struts can be considered as well.
ServletFilterwill help you intercept requests and check for user login status — here’s a good article : http://www.developer.com/security/article.php/3467801/Securing-J2EE-Applications-with-a-Servlet-Filter.htm