I have user.xsjs file which has the following code
var name1 = $.response.setBody($.session.getUsername());
I have test.html file I want to get the current user from user.xsjs file or aforesaid code directly used in test.html file to the get current user.
Need to get "Welcome CurrentUser!"
You can add a
<script>
tag in which you can make anajax
call to user.xsjs file and then output response to HTML.