I finally got Jetspeed running under Tomcat.  Had to not run JBoss at the
same time as there is a port conflict and had to copy some jarfiles from
JBoss lib into the Tomcat lib as the JBoss setup lets Tomcat use the ones
that JBoss has already loaded.

Anyway, trying the first portlet.  Managed to get it to compile without
errors.  It's below and not TOO original.  Added the portlet config
information to demo_portlets.xreg.  The reg lines are below also.
Started up and added the portlet to my user, (the portlet showed up in the
set of available ones).

When I go back to the home page I get an exception:

[Wed Dec 12 16:14:19 EST 2001] -- ERROR --
        Exception:  org.apache.jetspeed.portal.PortletException: PortletFactory:
Unable to load class com.shoulderscorp.portlet.ShouldersHelloPortlet
        Stack Trace follows:
        org.apache.jetspeed.portal.PortletException: PortletFactory: Unable to load
class com.shoulderscorp.portlet.ShouldersHelloPortlet
        at
org.apache.jetspeed.services.portletfactory.JetspeedPortletFactoryService.ge
tPortlet(JetspeedPortletFactoryService.java:194)

I placed the file under Web-inf/classes in parallel with the org path where
the one I copied from has it's classfile.

What is wrong here?

-------- portlet -----
package com.shoulderscorp.portlets;

import org.apache.jetspeed.portal.portlets.AbstractPortlet;

import org.apache.turbine.util.RunData;

import org.apache.turbine.om.security.User;

import org.apache.ecs.*;



public class ShouldersHelloPortlet extends AbstractPortlet

{

    public ConcreteElement getContent(RunData aRunData)

    {

        StringBuffer text =new StringBuffer();



        text.append("Hello From Shoulders");



        String name =aRunData.getUser().getFirstName();



        if (name ==null)

            name ="World";



        text.append (name);

        text.append ("!");

        return (new StringElement(text.toString()));

    }

}

----------- config ----
    <portlet-entry name="ShouldersJSP" hidden="false" type="ref"
        parent="JSP" application="false">
        <meta-info>
            <title>ShouldersJSP</title>
            <description>Simple Shoulders JSP Portlet Example</description>
        </meta-info>

<classname>com.shoulderscorp.portlet.ShouldersHelloPortlet</classname>
        <parameter name="template" value="hello.jsp" hidden="false"/>
        <media-type ref="html"/>
    </portlet-entry>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to