KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > helloworld > HelloWorld


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.portlet.helloworld;
10
11 import javax.portlet.GenericPortlet;
12 import javax.portlet.RenderRequest;
13 import javax.portlet.RenderResponse;
14 import java.io.PrintWriter JavaDoc;
15 import java.io.IOException JavaDoc;
16
17 public class HelloWorld extends GenericPortlet {
18
19    public void doView(RenderRequest request, RenderResponse response)
20    {
21       response.setContentType("text/html");
22       try {
23          PrintWriter JavaDoc writer = response.getWriter();
24          writer.write("Hello World !!!");
25          writer.close();
26       }
27       catch (IOException JavaDoc e)
28       {
29          e.printStackTrace();
30       }
31    }
32 }
33
Popular Tags