1 package org.exoplatform.services.portletcontainer.test.portlet; 2 3 4 import javax.portlet.*; 5 import java.io.IOException ; 6 import java.io.PrintWriter ; 7 8 import org.apache.commons.logging.Log; 9 import org.exoplatform.services.log.LogService; 10 11 15 16 23 public class PortletToTestIoC extends GenericPortlet{ 24 25 private LogService logService; 26 private Log log; 27 28 public PortletToTestIoC(LogService logService) { 29 this.logService = logService; 30 log = logService.getLog("org.exoplatform.portal.container"); 31 } 32 33 public void init(PortletConfig portletConfig) throws PortletException { 34 } 35 36 public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) 37 throws PortletException, IOException { 38 log.debug("Portlet is an IoC type 3 component"); 39 actionResponse.setRenderParameter("status", "Everything is ok"); 40 } 41 42 public void render(RenderRequest renderRequest, RenderResponse renderResponse) 43 throws PortletException, IOException { 44 renderResponse.setContentType("text/html"); 45 log.debug("Portlet is an IoC type 3 component"); 46 PrintWriter w = renderResponse.getWriter(); 47 w.println("Everything is ok"); 48 } 49 50 public void destroy() { 51 } 53 } 54 | Popular Tags |