You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Tarun Mangal <ta...@gmail.com> on 2006/03/02 09:52:47 UTC
Problem getting instance of PageManager
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
Re: Fwd: Problem getting instance of PageManager
Posted by Jacek Wiślicki <ja...@gmail.com>.
Wiadomosc od Tarun Mangal z 2006-03-03 07:34 brzmiala:
> Hi All,
> Kindly send in some pointers as i've been stuck on the below mentioned issue
> since yesterday.
The PageManager service should be enabled for you webapp in
jetspeed-portlet.xml. Make sure that you also modify portlet.xml to make
changes in jetspeed-portlet.xml detected or intruduce an appropriate
record for your webapp in the JETSPEED_SERVICES table (the bug with
checksumming jetspeed-portlet.xml described at
https://issues.apache.org/jira/browse/JS2-464).
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Fwd: Problem getting instance of PageManager
Posted by Randy Watler <wa...@wispertel.net>.
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 <ta...@gmail.com>
> Date: Mar 2, 2006 2:22 PM
> Subject: Problem getting instance of PageManager
> To: Jetspeed Users List <je...@portals.apache.org>
>
> 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: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Fwd: Problem getting instance of PageManager
Posted by Tarun Mangal <ta...@gmail.com>.
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 <ta...@gmail.com>
Date: Mar 2, 2006 2:22 PM
Subject: Problem getting instance of PageManager
To: Jetspeed Users List <je...@portals.apache.org>
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