Perfect. Thanks. On Thu, Jan 8, 2009 at 5:40 PM, Alan Chaney <a...@compulsivecreative.com> wrote: > Hi Ben > > You can get it from the request. In JSP you can access the request implict > object to get the value of the HttpServletRequest#getRemoteUser() method ... > > "Returns the login of the user making this request, if the user has been > authenticated, or null if the user has not been authenticated." > > (quote from j2ee docs for HttpServletRequest) > > The exact syntax to use depends upon whether or not you are using EL. > If you are using tags.. > <% String username = request.getRemoteUser() %> > > and in EL you can use the 'pageContext'. Try: > > ${pageContext.request.remoteUser} /// I think... you may need to check. > > and use as you see fit... > > Alan > > > Ben Tomlinson wrote: >> >> I have set up login security for some of the pages in my website. I >> have a JDBCRealm setup and working correctly. But now I want to >> change the layout of my pages (all jsp pages) according to the user >> that is logged in. How do I retrieve information about the user that >> is actually logged in? Mainly I want the user role or the user name >> but I can't seem to get it from the session. Any help would be >> appreciated. >> >> Ben >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> >> !DSPAM:49667e4a164556657853550! >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org