You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Marty <mp...@intlsc.com> on 2001/10/01 14:09:33 UTC

Re: HelloWorldPortlet...

You shouldn't need to add it to your classpath, but you should add your 
package to the Turbine properties file right after the entries for Turbine 
and Jetspeed.

modules entry.


On Monday 01 October 2001 08:18, you wrote:
> Hi Bob,
>
> Add the LOCATION of the   HelloWorldPorlet.class, in your CLASSPATH
> setting. It will work. Please check the log files for erros.
>
> Regards
>
> Peter Rajesh
>
> Bob.Wilson@americawest.com wrote:
> > All,
> >
> > I have become pretty frustrated trying to get this HelloWorld Portlet to
> > work.  Here are the steps I followed to do the HelloWorld example...can
> > anyone tell me what I am doing wrong (bare in mind I'm a newbie at this
> > and still working on understanding all this)??
> >
> > 1.  Created the portlet
> > /usr/local/etc/tomcat_3.2.3/webapps/jetspeed/WEB-INF/classes/HelloWorldPo
> >rtl et.java file.  Code is here....
> > import org.apache.jetspeed.portal.portlets.AbstractPortlet;
> > import org.apache.turbine.util.RunData;
> > import org.apache.ecs.*;
> >
> > public class HelloWorldPortlet extends AbstractPortlet
> > {
> >     publicConcreteElement getContent (RunData aRunData)
> >     {
> >         return (new StringElement ("Hello World!!"));
> >     }
> > }
> >
> > 2.  Compiled the code to the same directory to get a
> > HelloWorldPortlet.class file.
> >
> > 3.  Created a file called
> > /usr/local/etc/tomcat_3.2.3/webapps/jetspeed/WEB-INF/conf/local-portlets.
> >xre g with the following entry...
> > <portlet-entry name="HelloWorldPortlet" hidden="false" type="instance"
> > application="false">
> > <meta-info>
> > <title>Hello World Example</title>
> > </meta-info>
> > <classname>HelloWorldPortlet</classname>
> > <media-type ref="html"/>
> > </portlet-entry>
> >
> > 4.  Added the following to the
> > /usr/local/Jetspeed-1.3a1/bin/webapp/WEB-INF/conf/jetspeed-config.jcfg...
> > <portlet-entry type="instance" name="HelloWorldPortlet">
> > <classname>HelloWorldPortlet</classname>
> > </portlet-entry>
> >
> > 5.  Added the following code to
> > /usr/local/etc/tomcat_3.2.3/webapps/jetspeed/WEB-INF/psml/anon/html/en/de
> >fau lt.psml...
> > <portlets>
> > <entry type="ref" parent="HelloWorldPortlet"/>
> > </portlets>
> >
> > Now...I am able to select the portlet from the list when I go to the 'Add
> > Portlets' section in Jetspeed.  However, when I click on 'Save and Apply'
> > the portlet does NOT display on my homepage.  I'm not sure if I am doing
> > something wrong or there is something that I have left out.  Can anyone
> > see what I am doing wrong or maybe something that I have forgotten to
> > do??  Any help would greatly be appreciated!  Thanks in advance!!
> >
> > Regards,
> > Bob Wilson.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org