Hi Zheng, take a look at
http://jakarta.apache.org/tapestry/tapestry-portlet/coding-issues.html#User+Attributes
Zheng JinYuan wrote:
I user tapestry as my web UI develop framework.It's great! But when I
use tapestry for portal develop how can I access portal current user
information from tapestry ? I tried to use
public void pageBeginRender(PageEvent event){
RequestContext context = event.getRequestCycle().getRequestContext();
if (context != null){
HttpSession session = context.getSession();
if (session!=null){
java.util.Enumeration e = session.getAttributeNames();
while(e.hasMoreElements()){
String name = e.nextElement().toString();
System.out.println(name +" " +
session.getAttribute(name));
}
}
else{
System.out.print("session is null!");
}
}else{
System.out.print("context is null!");
}
}
to access the session infomation ,But context.getSession(); throws an
NULLPointerException ,It seems like _request.getSession()throw this
exception, there has no _request ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]