helloworld portlet

G

gluraski

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top