WebSphere Portal Server - session.getAttribute NullPointerException

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > February 2006 > session.getAttribute NullPointerException





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author session.getAttribute NullPointerException

2006-02-15, 3:03 am

Including the following line in default.jsp gives a NullPointerException. Is there any other way to get the user variable.

com.ibm.wps.puma.User user =(com.ibm.wps.puma.User)session.getAttribute("com.ibm.wps.util.session_user");
Dennis te Lintelo

2006-02-15, 7:58 am

This will get you the user:

<%
com.ibm.wps.engine.RunData rundata = com.ibm.wps.engine.RunData.from(request);
if (rundata.getUser() != null) {
// your code...
}
%>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com