Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
Servlets
how to get user or username using principle, httpRequest
Farhad Rahmati
Ranch Hand
Posts: 96
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello guys
I am new in
JEE
6 and
servlets
. I have been trying to learn how to get an instance of a user and show his username roles. I know how to check if a user is in a role. but I couldn't get how to show the username. or at least an instance of itself.
Thank you
Rob Spoor
Sheriff
Posts: 22802
131
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How about calling getName() on the Principal object?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Farhad Rahmati
Ranch Hand
Posts: 96
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thank you very much,
Rob Spoor
Sheriff
Posts: 22802
131
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You're welcome.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
I found a beautiful pie. And a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
showing one form if the other form is submitted
print name in header
Authentication with JDBCRealm - getUser() ?
[hibernate] How to load lazy collections
Authnetication and getRemoteUser()
More...