Anupindi, Ravikiran wrote:
I am new to Jetspeed. I am trying to write my own Portlets in Jetspeed-1.You are using parent="IFramePortlet" in your xreg definition. This is wrong as it tells Jetspeed that your
The following is a sample portlet from a book (FirstPortlet.java). The code
compiles and I copied the class file to WEB-INF/classes/local_portlets/
directory.
I added the portlet entry (see bellow) to the local-portlets.xreg file in
the WEB-INF/conf directory. I can see the new portlet in the Jetspeed admin
webpage, I can add it to the page but when I preview the page nothing shows
up :-(
What am I doing wrong. Please help
Thanks, Ravi
****************************************
FirstPortlet.java:
***************************************** package local_portlets;
import java.io.IOException; import java.io.Writer; import javax.portlet.GenericPortlet; import javax.portlet.PortletException; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse;
public class FirstPortlet extends GenericPortlet { protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { response.setContentType("text/html"); Writer writer = response.getWriter(); writer.write("Help, I'm a portlet, and I'm trapped in a portal!"); }
}
***********************************************
local-portlets.xreg: ***************************************************
<?xml version="1.0" encoding="UTF-8"?> <registry> <portlet-entry name="FirstPortlet" hidden="false" type="ref" parent="IFramePortlet" application="false"> <meta-info> <title>First Portlet</title> <description>First Portlet</description> </meta-info> <classname>local_portlets.FirstPortlet</classname> <category group="Jetspeed">frames</category> </portlet-entry> </registry> ***************************************************
portlet definition is just a customization of IFramePortlet and thus Jetspeed will use the IFramePortlet
class and not yours.
You need to use type="base" and remove the parent defintion in the above registry fragment.
-- Rapha�l Luta - [EMAIL PROTECTED] Apache Portals - Enterprise Portal in Java http://portals.apache.org/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
