Identifying Virtual Portal URL in Servlet and/or AuthFilter

For one of my assignment, in Authentication Filter(Explicit LoginFilter) i was required to identify which virtual portal url is being hit by a user and depending on url, i have to redirect to appropriate virtual portal from Authentication Filter.

Task was to identify which virtual portal url is being hit by an end user and get that url in authentication filter.

Here is the code snippet that i used in my filter class, this might useful for you also..


WPServerVPContext ctxXml = (WPServerVPContext)
httpServletRequest.getAttribute("com.ibm.portal.state.accessors.url.ServerContext");


String vpPublicUrl = ctxXml.getHomePublic();

System.out.println("vpPublicUrl is >>>>"+vpPublicUrl);

portalLoginContext.setRedirectURL(vpPublicUrl);

1 comment:

Anonymous said...

Cool post you got here. I'd like to read more about that topic. The only thing it would also be great to see here is a few pics of any gizmos.
Katherine Watcerson
Block phone