Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Websphere Portal NullPointerException

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am using Websphere Portal version 6 and RAD 7


I am getting this exception (NullPointerException) when i run the JSP below


My Debug shows it is encountering the exception at

PortletSession enu=renderRequest.getPortletSession(true);

Is there a reason why i can't obtain the portletSession
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a wild shot in the dark here, but could it have anything to do with session=false?

-Cameron McKenzie
 
Praveen Belkar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For any jsp there are 9 variable which can be used without defining them viz. request, response, session, config, application, out, exception, pageContext. Here request, response and session refers to HttpRequest, HttpResponse and HttpSession.
When we set session=false in page directive, it means we can't use session variable as it is. But we can get it exclusively by doing request.getSession() in servlet environment and renderRequest.getPortletSession() in portlet environment.

BTW, I was able to run this piece of code without any error. May the exception you are getting is not related to code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic