Announcement Announcement Module
Collapse
No announcement yet.
check if user is logged in. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • check if user is logged in.

    can anyone please help how can i check if a user is logged in.... i want form authentication wherein some jsp pages cannot be access if the user is not logged in. thats now the only problem of my web app..

  • #2
    Look at the API for HttpServletRequest. It has a method to getUserPrincipal() which will be non null value if users are authenticated.

    There might be other ways also depending on the security framework you use, but all of them would be setting the user principal value on the request object during successful authentication.

    Comment


    • #3
      Try Spring Security or any other Security mechanism.

      Comment

      Working...
      X