Tarun,

Please verify that the id specified in the jetspeed-portlet.xml and portlet.xml portlet-app tag matches. I am not totally convinced that this is required, but it cant hurt and IIRC, someone else had that problem initially. Also, please make sure that the jetspeed-portal.xml gets deployed correctly as Jacek pointed out.

Randy

Tarun Mangal wrote:
Hi All,
Kindly send in some pointers as i've been stuck on the below mentioned issue
since yesterday.

Thanks in advance,
Tarun

---------- Forwarded message ----------
From: Tarun Mangal <[EMAIL PROTECTED]>
Date: Mar 2, 2006 2:22 PM
Subject: Problem getting instance of PageManager
To: Jetspeed Users List <[email protected]>

Hi All,
I'm trying to create an instance of PageManager using the following line of
code

public class Simplest extends GenericServletPortlet {
    private PageManager pageManager = null;

    public void init(PortletConfig config) throws PortletException{
        super.init(config);
        pageManager = (PageManager)getPortletContext().getAttribute(
CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
        if (null == pageManager)
        {
            System.out.println ("page manager is null");
        }
        System.out.println ("here " + pageManager.getClass().toString());
    }
------------------------------

I also have created a jetspeed-portlet.xml with the following content:

<portlet-app id="simplest" version="1.0"
    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd "
    xmlns:js="http://portals.apache.org/jetspeed";
    xmlns:dc="http://www.purl.org/dc";>

    <dc:title>Jetspeed-2 Simplest Portlets</dc:title>
    <dc:title xml:lang="en">Jetspeed-2 Simplest Portlets</dc:title>
    <dc:creator>Tarun Mangal</dc:creator>

    <portlet>
        <portlet-name>Simplest</portlet-name>
        <dc:title>Simplest</dc:title>
        <dc:creator>J2 Team</dc:creator>
    </portlet>

    <js:services>
        <js:service name='PageManager'/>
    </js:services>

</portlet-app>
-------------------------------------------

When i start Tomcat server and call for the portlet, I get a message on the
Tomcat start window "page manager is null"

Can you please tell what is the correct procedure of creating an instance of
a service?

Thanks,
Tarun


--
Tarun



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to