0

I am beginner for java, My project contains two web pages one is login page and other is main page which has three frames with logout button,When i click on log out it will again go to page which ask the user to login . but after sign out when i click previous button available on browser it is going to the main page ,What exactly has to be done to stop accessing the data once after log-out. Please help me out

Thanks in Avance

Regards, Akhila

1 Answers1

-1

You need to apply session management to deal with this issue. When user logs in create a session(on log in page).

HttpSession session=new HttpSession();

Then on the main page check if a session exists or not.Like this-

if(session.isNew())
{
//redirect to login page}
}
else
{
//Rest of your code.
}
ValarDohaeris
  • 639
  • 1
  • 6
  • 21