-
1. Re: What is the classpath for compiling a portlet
gruenewa Dec 8, 2005 8:42 AM (in response to pengyeng)I guess you need only a the file portlet-api-1.0.jar.
As I know the interface PortletConstants is NOT included in portlet-api-1.0.jar.
For instance, a minimum JSR168 portlet looks like this:
-----------------------------------------
import java.io.IOException;
import java.io.Writer;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
public class FirstPortlet extends GenericPortlet
{
protected void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
response.setContentType("text/html");
Writer writer = response.getWriter();
writer.write("Help, I'm a portlet, and I'm trapped in a portal!");
}
}
-------------------------------------------------- -
2. Re: What is the classpath for compiling a portlet
roy.russo Dec 8, 2005 12:10 PM (in response to pengyeng)I have made available a simple HelloWorldPortlet with the new 2.2 descriptor, src included, that you can download from here: http://labs.jboss.com/portal/index.html?ctrl:id=page.default.downloads&project=portletswap&category=.portlets.miscellaneous
-
3. Re: What is the classpath for compiling a portlet
pengyeng Dec 8, 2005 11:27 PM (in response to pengyeng)Thanks a lot.
Finally, I successfully deployed my first portlet.