It seems like you're simply trying to run a portlet in a container that isn't actually a portal. Simply assembling a portlet webapp with Pluto (adding the dispatcher serlvet) just adds the logic needed in the portlet webapp for pluto to dispatch to it. The guts of the portlet container (aka portal) still needs to be deployed as a seperate webapp, then you interact with that portal webapp and it dispatches to your portlet.
-Eric On 12/29/11 3:41 AM, Behrooz Nobakht wrote:
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.xmllooks 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.xmllooks 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:deployto deploy the WAR into Geronimo. It succeeds. * The MyPortlet#initmethod 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_IDattached 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 DefaultPortletInvokerServiceshould be called in invokemethod 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
smime.p7s
Description: S/MIME Cryptographic Signature
