KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > core > portlet > DefaultPortlet


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.core.portlet;
10
11 import java.io.IOException JavaDoc;
12 import java.io.PrintWriter JavaDoc;
13
14 import javax.portlet.GenericPortlet;
15 import javax.portlet.PortletException;
16 import javax.portlet.PortletSecurityException;
17 import javax.portlet.RenderRequest;
18 import javax.portlet.RenderResponse;
19 import javax.portlet.WindowState;
20
21 /**
22  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
23  * @version $Revision: 1.2 $
24  */

25 public class DefaultPortlet extends GenericPortlet
26 {
27    public void render(RenderRequest request, RenderResponse response) throws PortletException, PortletSecurityException, IOException JavaDoc
28    {
29       if (!WindowState.MINIMIZED.equals(request.getWindowState()))
30       {
31          response.setTitle("Hello portlet");
32          response.setContentType("text/html");
33          PrintWriter JavaDoc writer = response.getWriter();
34          writer.print("Welcome to JBoss Portal.");
35       }
36    }
37 }
38
Popular Tags