1 9 package org.jboss.portal.core.portlet; 10 11 import java.io.IOException ; 12 import java.io.PrintWriter ; 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 25 public class DefaultPortlet extends GenericPortlet 26 { 27 public void render(RenderRequest request, RenderResponse response) throws PortletException, PortletSecurityException, IOException 28 { 29 if (!WindowState.MINIMIZED.equals(request.getWindowState())) 30 { 31 response.setTitle("Hello portlet"); 32 response.setContentType("text/html"); 33 PrintWriter writer = response.getWriter(); 34 writer.print("Welcome to JBoss Portal."); 35 } 36 } 37 } 38 | Popular Tags |