HOW TO REDIRECT TO LOGIN PAGE IF NOT LOGGED IN
HI,
my tomcat web application is working perfectly and it have only javascript and jsp pages.. but the problem is if user types any url of any particular jsp page in tomacat server its displaying that page..so please help me how to redirect to login page if user user types url.. he should login first before opening any pages............ please help me for this.
Re: HOW TO REDIRECT TO LOGIN PAGE IF NOT LOGGED IN
Do you know the concept of session and cookies? If no, go on and read.
Re: HOW TO REDIRECT TO LOGIN PAGE IF NOT LOGGED IN
Thank u for your reply....
yes i saw the concept of session and cookies. but wherever i saw i'm finding sessions for login and logout but session for login and logout is perfectly working in my app.. and i'm thinking that session should be placed in each and every jsp right?... but i'm unable to find the code for this and if i found also not knowing were to keep that code in every jsp... please help me if you have any idea... if you have reference material on regarding this also then please link here .......... i'l refer...
Re: HOW TO REDIRECT TO LOGIN PAGE IF NOT LOGGED IN
Before redirecting the user to any page, just check if session is not null.