File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Portals and Portlets and the fly likes custom-portlet-mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "custom-portlet-mode" Watch "custom-portlet-mode" New topic


praveen kanakarajan
Ranch Hand

Joined: Apr 27, 2005
Posts: 54
i tried to create a custom-portlet-mode portlet and tried to deploy it in Apache Pluto.but its showing error when i try to create a action URL specifying portletmode.saying its unsupported as follows.I have specifed the custom-portlet-mode in portlet.xml and also the overridden the doDispatch method.

Nested Exception is javax.portlet.PortletModeException: unsupported Portlet Mode used: save
at org.apache.pluto.core.impl.PortletURLImpl.setPortletMode(
at org.apache.pluto.tags.ActionURLTag.doStartTag(
at org.apache.jsp.mediaview_jsp._jspx_meth_portlet_actionURL_1(org.apache.jsp.mediaview_jsp:173)
at org.apache.jsp.mediaview_jsp._jspService(org.apache.jsp.mediaview_jsp:116)
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(

it would be helpful if someone could tell me whether it is supported or not and if it supports,can antyone give me links or such where i can get sample code or tutorial for this.
Stefan Zoerner
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
It is not possible to define a new custom portlet mode by a portlet. Only a portal may introduce its own modes (like WebSphere Portal, which introduces the "config" mode).

Greetings, Stefan

Stefan Zoerner
Author of German LDAP-Book
Committer at Apache Directory Project
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

The portal itself must support any custom portlet modes you want to develop for your portlet. If you want your portlet to have a print mode, you can't just override the doDispatch method - your portal must explicitly support that portal mode. To find out which portlet modes your portal administrator had decided to support, you can always query the PortalContext.

From the WebSphere Portal Certification Guide (Test 399):

"The PortalContext has five methods, including getPortalInfo, getPropertyNames, getProperty, getSupportedPortletModes and getSupportedWindowStates. The object used to access the RequestDispatcher and the portal logging mechanism is the similarly named PortletContext object."


-Cameron McKenzie
[ October 28, 2006: Message edited by: Kameron McKenzie ]
I agree. Here's the link:
subject: custom-portlet-mode
It's not a secret anymore!