Topic
  • No replies
SystemAdmin
SystemAdmin
30895 Posts

Pinned topic Null Pointer Exception While calling next filter in Portlet Login Filter

‏2013-01-21T23:10:03Z |
Hi all,

In my Portal Login Filter Code,

chain.login(request, response, userId, password, portalLoginContext, subject, realm); is throwing a null pointer exception.

Upon debugging I found that, "realm" String received from previous chain is null. Would that really affect my Portal to call the next filter chain? I am not using LDAP.

In IE , Portal is further processing and redirecting to the URL specified.

But the problem I am facing is that, My theme is not loaded and Portal doesn't t seem to load theme on clicking any other navigation links.

Has anyone faced a issue like this?
Please suggest me possible problem with my code.Below is the code snipped I have coded.

System.out.println("Entering SamplExplicitLoginFilter.login()");
System.out.println("User Id " + userId);
System.out.println("Password " + String.valueOf(password));

chain.login(request, response, userId, password, portalLoginContext, subject, realm);
if(request.getRemoteUser().equals("wpadmin"))
portalLoginContext.setRedirectURL("/wps/myportal/Administration");
System.out.println("Exiting SamplExplicitLoginFilter.login()");