When I do this I then get the following error in my portlet: "Could not get 
instance of portal statistics component".

>>> David Sean Taylor [EMAIL PROTECTED]> 6/3/2008 1:58 PM >> ( mailto:[EMAIL 
>>> PROTECTED]> )

Here is an arbitrary example of using a Jetspeed service in a  
portlet's init:

     private PortalStatistics statistics;


     public void init(PortletConfig config) throws PortletException
     {
         super.init(config);
         PortletContext context = getPortletContext();
         statistics = (PortalStatistics) context
                 .getAttribute 
(CommonPortletServices.CPS_PORTAL_STATISTICS);
         if (statistics == null)
                 throw new PortletException(
                         "Could not get instance of portal statistics  
component");
     }


and then perhaps in your processAction:

...
DataSource ds = statistics.getDataSource();




Reply via email to