see:

http://svn.apache.org/repos/asf/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalStartupListener.java

Graham Klyne wrote:
Hi, it's me again ;-)

I'm trying to create a Pluto instance running under ServletUnit;
specifically I'm trying to run the Test portlets in a unit test framework.

I've created an initial cut of code that simply tries to get a rendering
 of the test portlet page, but I'm clearly not initializing it properly.
 I'm getting a null pointer error about:
[[
PortletWindowConfig windowConfig = driverConfig.getPortletWindowConfig(
                        actionWindowId);
]]
in method doGet of class PortalDriverServlet

Tracing the class 'init' method, I see 'container' and 'driverConfig'
are returned as null:
[[
ServletContext servletContext = getServletContext();
container = (PortletContainer) servletContext.getAttribute(
                        AttributeKeys.PORTLET_CONTAINER);
driverConfig = (DriverConfiguration) servletContext.getAttribute(
                        AttributeKeys.DRIVER_CONFIG);
]]

It seems a safe guess that this is because the required attributes have
not been set in the (ServletUnit) servlet context structure.  So I've
gone digging around the Pluto installation to try and work out where
attributes named "portletContainer" and "driverConfig" are actually
specified, and I've drawn a complete blank.  Can anyone offer a hint,
please?

(Has anyone reading this run Pluto under ServletUnit?  If so, would they
be prepared to allow me sight of their code used to set up and run the
portal driver?)

Thanks.

#g


Reply via email to