My (generic) portlet reads the PortletMode whenever an action request /processAction(ActionRequest request, ActionResponse response) is computed.
Sadly the code, which worked in Version 2.0 does not work here anymore because request.getPortletMode() throws a NullPointerException, debugging showed that an internal variable named (guess what) "mode" is null. Appearantly the org.jboss.portal.server.app.impl.AbstractInputContext gets instanciated with null.
This does NOT happen in Render Requests / render(RenderRequest renderrequest, RenderResponse renderresponse)
I am using the current jboss/tomcat integration:
*JBoss Portal 2.2 + JBoss AS 4.0.3SP1
jboss has been used out of the box, no modifications, just copied my war into the deploy dir.
OS is windows xp
java is 1.5.06 (sun)
We use a generic portlet that implements javax.portlet.Portlet. The portlet uses a workflow engine and is configured via the portlet parameters.
RenderRequests get computed just fine, getPortletMode() works as expected.
I used the web management tool to create an instance of my portlet, added it to the Test page and tried to use it.