• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to maintain user name in all the Jsp pages

 
Dev Anand
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web application which has 'Login' feature. Once I login to the application, it should check in all the Jsp Pages that it is logged in or not. If not, the application should be redirected to the login page quoting that 'He should login to use the application'.

I want to implement timeout feature also.

With Regards
Dev Anand. P
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dev,
First thing, dont program to access your jsp directly unless there are no server-side processing involved.

"Session" is what you should be after. Configure a Filter to check if a user belongs to any session , (you could check with HttpSession methods) and route to login page accordingly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic