[jboss-user] [JBoss Portal] - Re: Need a portlet that display
je.a.le
do-not-reply at jboss.com
Tue May 13 11:08:06 EDT 2008
"sky2rain" wrote : Someone please help tell how to write a simple portlet that shows "loged in as : username"; we are frustrated by the lack of docs. Please simply point out which packages are needed to import in order to do this and we can handle the rest. Thanks a million!!
the answer is actually in the doc...
http://docs.jboss.com/jbportal/v2.2/javadoc/javax/portlet/PortletRequest.html#getRemoteUser()
which could translate into :
| public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
| //.....
| String login = request.getremoteUser();
| request.setAttribute("login", login );
| .....
| }
|
and use el into your jsp ${login}
If null : not yet logged.
If you need more information than login, you should call mbean ; there're posts in the forum archives.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150420#4150420
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150420
More information about the jboss-user
mailing list