1 package org.exoplatform.services.portletcontainer.test.portlet; 2 3 import javax.portlet.*; 4 import java.io.IOException ; 5 import java.io.PrintWriter ; 6 import java.net.URLDecoder ; 7 8 12 13 20 public class PortletToTestParameterNonEncoding extends GenericPortlet{ 21 22 public void init(PortletConfig portletConfig) throws PortletException { 23 } 24 25 public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) 26 throws PortletException, IOException { 27 } 28 29 public void render(RenderRequest renderRequest, RenderResponse renderResponse) 30 throws PortletException, IOException { 31 renderResponse.setContentType("text/html"); 33 String param1 = renderRequest.getParameter("renderParam"); 34 if(!param1.equals(URLDecoder.decode(param1))) 35 throw new PortletException("getParameter does not work"); 36 37 PrintWriter w = renderResponse.getWriter(); 38 w.println("Everything is ok"); 39 } 40 41 public void destroy() { 42 } 44 45 } 46 | Popular Tags |