I want to show logged in user in main decorator page. i use :
<decorator:usePage id="myPage"/>
Logged in as:<%= myPage.getRequest().getUserPrincipal().getName()%>
<decorator:body/>
but not work!
I want to show logged in user in main decorator page. i use :
<decorator:usePage id="myPage"/>
Logged in as:<%= myPage.getRequest().getUserPrincipal().getName()%>
<decorator:body/>
but not work!
Haven't worked with SiteMesh for quite some time, but why aren't you using the implicit request
object instead (I assume your pages are written in JSP, right?)
<%= request.getUserPrincipal().getName() %>
And what's exactly not working? Is an exception getting thrown?