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 dsaf df <bo...@yahoo.com> on 2001/10/03 13:33:40 UTC

helloworld

hullo all !

i am trying to run the helloworld portlet as given in
portlet how-to.

my code is as under:

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 HelloWorldPortlet extends AbstractPortlet

{

    public ConcreteElement getContent(RunData
aRunData)

    {

        StringBuffer text =new StringBuffer();

 

        text.append("Hello ");

 

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

 

        if (name ==null)

            name ="World";

 

        text.append (name);

        text.append ("!");

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

    }

}

however...i have not been able to compile the above.
it gives the following error:

E:\>javac -classpath
\jet\lib\jetspeed.jar;\jet\lib\ecs-1.4.1.jar;\jet\lib\turbi
ne-2.1.jar
\HelloPortal\src\com\gluecode\portal\portlets\testing5.java
\HelloPortal\src\com\gluecode\portal\portlets\testing5.java:27:
cannot access ja
vax.servlet.http.HttpSessionBindingListener
file
javax\servlet\http\HttpSessionBindingListener.class
not found
        String name
=aRunData.getUser().getFirstName();
                                     ^
1 error

i also tried importing the javax.servlet.http.*   ....
but cud not beena ble to compile.

can anyone please help me here???

thanks ,

BB


__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com

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