Rapha�l, Thanks for the response. I made the change as you suggested. Now the problem is, i don't see the new portlet in the list of portlets to choose from. It looks like, if there is no parent defined, the portlet is not shown in the list. Is there anyway i can add the portlet manually to the page?
Thanks, Ravi -----Original Message----- From: Rapha�l Luta [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 12:42 PM To: Jetspeed Developers List Subject: Re: Jetspeed-1 and new portlets... Anupindi, Ravikiran wrote: > I am new to Jetspeed. I am trying to write my own Portlets in Jetspeed-1. >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> >*************************************************** > > > You are using parent="IFramePortlet" in your xreg definition. This is wrong as it tells Jetspeed that your 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
