Trace:
Differences
This shows you the differences between two versions of the page.
|
applications:current_username [2018/02/07 07:53] admin created |
applications:current_username [2020/07/01 16:58] (current) cduncan Edited for English grammar (capitalization, punctuation, correct verb conjugation) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ~~NOTRANS~~ | ~~NOTRANS~~ | ||
| - | ~~Title: How-to get the current username~~ | + | ~~Title: How to Get the Current Username~~ |
| - | If you want to know the current user-name in your application, simply call: | + | If you want to know the current username in your application, simply call: |
| <file java> | <file java> | ||
| Line 20: | Line 20: | ||
| </file> | </file> | ||
| \\ | \\ | ||
| - | Above code is client-side code. If you need the user-name on server-side, simply call: | + | The above code is client-side code. If you need the username server side, simply call: |
| <file java> | <file java> | ||
| SessionContext.getCurrentSession().getUserName(); | SessionContext.getCurrentSession().getUserName(); | ||
| </file> | </file> | ||
