File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Authentication with JDBCRealm - getUser() ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Authentication with JDBCRealm - getUser() ?" Watch "Authentication with JDBCRealm - getUser() ?" New topic

Authentication with JDBCRealm - getUser() ?

joe joel

Joined: Nov 30, 2009
Posts: 2

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"...

joe joel

Joined: Nov 30, 2009
Posts: 2
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

Joined: Nov 20, 2008
Posts: 65
You can invalidate session.
I agree. Here's the link:
subject: Authentication with JDBCRealm - getUser() ?
It's not a secret anymore!