Since I'm new to cq-5, I have this very basic question. I'm writing my own custom form action to store data entered by the user in the repository. For doing this, I'm writing my own custom jsp page to define all the actions when the submit button is clicked. Now in this jsp page I need to get the details of the user who has logged-in in the current session.
So can someone please tell me which classes and methods do I need to use to get these user details?
Please help. Thanks.
On http://localhost:4502/system/console/adapters you can find, that you can adapt a SlingHttpServletRequest to a UserProperties object.
So in a JSP context this will work:
com.adobe.granite.security.user.UserProperties up = request.adaptTo(UserProperties.class);
See  for the UserProperties API, and  for some more information on how the adaptTo() mechanism works.