portals-pluto-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 Thu, 29 Dec 2011 09:41:30 GMT
Hello,

I originally posted the following
message<http://apache-geronimo.328035.n3.nabble.com/Geronimo-3-0-beta-1-Pluto-Portlet-Deployment-td3616167.html>at
Apache Geronimo user mailing list and they suggested posting it here,
too. So, I would be thankful for any idea or help on this.

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