This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hi, 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(PortletURLImpl.java:96) at org.apache.pluto.tags.ActionURLTag.doStartTag(ActionURLTag.java:64) 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(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
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.
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.
"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."