1 package org.exoplatform.services.portletcontainer.test.portlet; 2 3 import javax.portlet.*; 4 import java.io.IOException ; 5 import java.io.PrintWriter ; 6 7 11 12 19 public class PortletToTestPortletURL2 implements Portlet{ 20 public void init(PortletConfig portletConfig) throws PortletException { 21 } 23 24 public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException { 25 } 26 27 public void render(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException { 28 renderResponse.setContentType("text/html"); 30 String param = renderRequest.getParameter("testParam"); 31 if(!"testParamValue".equals(param)) 32 throw new PortletException("getParameter does not work"); 33 34 PrintWriter w = renderResponse.getWriter(); 35 w.println("Everything is ok"); 36 } 37 38 public void destroy() { 39 } 41 } | Popular Tags |