helloworld portlet

Discussion in 'Java' started by gluraski, Jun 9, 2005.

  1. gluraski

    gluraski Guest

    I created this simple portlet:

    package helloworld;

    import javax.portlet.*;
    import java.io.*;

    public class HelloWorld extends GenericPortlet {
    public void doView(RenderRequest request, RenderResponse response)
    throws PortletException, IOException {
    PortletPreferences pref = request.getPreferences();
    String displayText=pref.getValue("displaytext","MISSING:
    display-text");
    response.setContentType(request.getResponseContentType());
    PrintWriter writer=response.getWriter();
    writer.write(displayText);
    }
    }

    When I try to compile bye javac it prompts the following msg:
    java.portlet.* package doesn't exist ... but in a classpath I set the
    portlet-api-1.0.jar file.
    Why doesn't it compile?

    thanks Gianluca
    gluraski, Jun 9, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mister.programmer

    Trouble compiling HelloWorld with vbc

    Mister.programmer, Feb 10, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,425
  2. the_JAVA_Rookie
    Replies:
    5
    Views:
    10,542
    Mickey Segal
    Aug 19, 2003
  3. Michael Meyer
    Replies:
    0
    Views:
    400
    Michael Meyer
    Aug 22, 2003
  4. Guest
    Replies:
    0
    Views:
    3,673
    Guest
    Jan 18, 2004
  5. Leo Wong

    ANN: HELLOWORLD

    Leo Wong, Jul 9, 2005, in forum: Java
    Replies:
    4
    Views:
    387
    Leo Wong
    Jul 9, 2005
Loading...

Share This Page