Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Authentication with JDBCRealm - getUser() ?

 
joe joel
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm beginner in java programming web application.
I found, how to use JDBCRealm, it works fine, but can you tell (show some example, plese:-) I can't find anything) me, how can I add link to logout on JSP page? And how can I get username for login user?

EDIT? I would want show info for login user, for example: "Login as ..... and you can logout here"...

Thanks
 
joe joel
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I find info about login user, in request.getUserPrincipal() ... but how can I do logout for this user? Any idea, please?
 
Dejan Mratinkovic
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can invalidate session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic