geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Behrooz Nobakht <nob...@gmail.com>
Subject Geronimo 3.0-beta-1: Pluto Portlet Deployment
Date Wed, 28 Dec 2011 10:27:25 GMT
Hello,

I am trying to deploy a simple Pluto Portlet into Geronimo 3.0-beta-1:

   - I have a simple class extending javax.portlet.GenericPortlet. The
   class overrides method doRender or doView for a plain sample.
   - The portlet.xml looks like:

<portlet>
<portlet-name>MyPortlet</portlet-name>
<portlet-class>MyPortletClassQualifiedPath</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<portlet-info>
<title>My Portlet</title>
</portlet-info>
</portlet>


   - The geronimo-web.xml looks like:

<sys:environment>
<sys:moduleId>
<sys:groupId>my-project-group-id</sys:groupId>
<sys:artifactId>my-project-artifact</sys:artifactId>
<sys:version>1.0-SNAPSHOT</sys:version>
<sys:type>war</sys:type>
</sys:moduleId>
<sys:dependencies>
<sys:dependency>
<sys:groupId>org.apache.portals</sys:groupId>
<sys:artifactId>portlet-api_2.0_spec</sys:artifactId>
<sys:version>1.0</sys:version>
</sys:dependency>
<sys:dependency>
<sys:groupId>org.apache.portals.pluto</sys:groupId>
<sys:artifactId>pluto-container</sys:artifactId>
<sys:version>2.0.1</sys:version>
</sys:dependency>
<sys:dependency>
<sys:groupId>org.apache.portals.pluto</sys:groupId>
<sys:artifactId>pluto-container-api</sys:artifactId>
<sys:version>2.0.1</sys:version>
</sys:dependency>
<sys:dependency>
<sys:groupId>org.apache.portals.pluto</sys:groupId>
<sys:artifactId>pluto-container-driver-api</sys:artifactId>
<sys:version>2.0.1</sys:version>
</sys:dependency>
<sys:dependency>
<sys:groupId>org.apache.portals.pluto</sys:groupId>
<sys:artifactId>pluto-portal-driver</sys:artifactId>
<sys:version>2.0.1</sys:version>
</sys:dependency>
<sys:dependency>
<sys:groupId>org.apache.portals.pluto</sys:groupId>
<sys:artifactId>pluto-portal-driver-impl</sys:artifactId>
<sys:version>2.0.1</sys:version>
</sys:dependency>
<sys:dependency>
<sys:groupId>org.apache.geronimo.plugins</sys:groupId>
<sys:artifactId>pluto-support</sys:artifactId>
</sys:dependency>
                <sys:dependency>

<sys:groupId>org.apache.geronimo.plugins</sys:groupId>
                        <sys:artifactId>geronimo-pluto</sys:artifactId>
                <sys:version>3.0-beta-1</sys:version>
                </sys:dependency>
</sys:dependencies>
<sys:hidden-classes />
<sys:non-overridable-classes />
</sys:environment>

<context-root>/control</context-root>

   - In web.xml, I have:

<servlet>
<servlet-name>MyPortletServlet</servlet-name>
<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
<init-param>
<param-name>portlet-name</param-name>
<param-value>MyPortlet</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MyPortletServlet</servlet-name>
<url-pattern>/PlutoInvoker/p/d</url-pattern>
</servlet-mapping>


   - I use Maven geronimo:deploy to deploy the WAR into Geronimo. It
   succeeds.
   - The MyPortlet#init method is called to just verify that the portlet is
   initialized.
   - When I issue the address
http://localhost:8080/control/PlutoInvoker/p/dI receive an NPE having
a root cause in that there is not
   METHOD_ID attached to the HTTP request attributes.
   - I debugged the mixture of Apache Geronimo + Jetty + Pluto and I found
   out that based on the life cycle, for each portlet request, the object
   DefaultPortletInvokerService should be called in invoke method to
   prepare the METHOD_ID and other attributes in the HTTP request. I debugged
   this and the method gets called for other portlets in Geronimo. For my
   portlet, this does *not* happen.

Can you please tell what I am doing wrongly?

Thanks,
Behrooz

Mime
View raw message