Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Authentication with JDBCRealm - getUser() ?  RSS feed

 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!