Thanks Alexander thats exactly what I needed.

2009/10/13 Alexander Klimetschek <[email protected]>:
> On Tue, Oct 13, 2009 at 14:32, Ben Short <[email protected]> wrote:
>> How to get the username of the user making the request in my jsp file?
>
> When logged in to the JCR (which is the default way in Sling), you can
> get the user id from the current session:
>
> session.getUserID();
>
> To get the session, you can do two things:
>
> Session session = currentNode.getSession();
> Session session = resourceResolver.adaptTo(Session.class);
>
> See also http://cwiki.apache.org/SLING/scripting-variables.html
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> [email protected]
>

Reply via email to