1- Using Groovy: We can set default expression in view object attribute as below
adf.context.securityContext.getUserPrincipal().getName()
or
adf.context.securityContext.getUserName()
2- Java Code: You can get User Name in Java code also using the following code.
ADFContext adfCtx = ADFContext.getCurrent();
SecurityContext secCntx = adfCtx.getSecurityContext();
String user = secCntx.getUserPrincipal().getName();
String _user = secCntx.getUserName();
3-Expression Language: You can bind ADF Faces componenets with the following EL to get logged User Name.
#{securityContext.userName}
Source:http://mahmoudoracle.blogspot.in/2012/06/adf-get-current-logged-user-name.html#.UmTBMPlHK8w
adf.context.securityContext.getUserPrincipal().getName()
or
adf.context.securityContext.getUserName()
2- Java Code: You can get User Name in Java code also using the following code.
ADFContext adfCtx = ADFContext.getCurrent();
SecurityContext secCntx = adfCtx.getSecurityContext();
String user = secCntx.getUserPrincipal().getName();
String _user = secCntx.getUserName();
3-Expression Language: You can bind ADF Faces componenets with the following EL to get logged User Name.
#{securityContext.userName}
Source:http://mahmoudoracle.blogspot.in/2012/06/adf-get-current-logged-user-name.html#.UmTBMPlHK8w