WebSphere Portal Server - Creating CompositeName for virtual portals

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > August 2007 > Creating CompositeName for virtual portals





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 Creating CompositeName for virtual portals

2007-08-06, 1:21 am

Hi,

I'm trying to write some code to get the ObjectID of a page that exists in a virtual portal. This code is in a jsp that will be in the screens folder.

So far, I've got

Context ctx = new InitialContext();
Name uniqueName = new CompositeName("portal:uniquename");
uniqueName.add(pageName);
ObjectID oidForName = (ObjectID) ctx.lookup(uniqueName);

This works fine when the pageName exists in the root context. However, if the page is in a virtual portal, the lookup returns null.

Am I using the wrong InitialContext()? Maybe I need to use something else to get the context object for the virtual portal.

Or may be my base name - "portal:uniquename" is incorrect and I should be using something else?

Can some one help with this?

Regards,
Vivek
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com