Hi,
I would like know how to get the user from client context in my java service.
Please let me know if you are looking for more details.
Thanks
Nani
Solved! Go to Solution.
Views
Replies
Total Likes
That's quite simple, as it is teh user, which is executing the request; so somehting like
request.getUserPrincipal()
from the Java servlet API should do the trick. But be aware: The clientside code is always executed in the browser; but when all the responses the client browser made to the server, are actually delivered from a cache, your serverside code is never executed. So if you want to cache your pages, you should not rely on your serverside code.
kind regards,
Jörg
Views
Replies
Total Likes
That's quite simple, as it is teh user, which is executing the request; so somehting like
request.getUserPrincipal()
from the Java servlet API should do the trick. But be aware: The clientside code is always executed in the browser; but when all the responses the client browser made to the server, are actually delivered from a cache, your serverside code is never executed. So if you want to cache your pages, you should not rely on your serverside code.
kind regards,
Jörg
Views
Replies
Total Likes