Tuesday, October 14, 2008

How to use getParameter on jsp page in liferayportlet

How to use getParameter on jsp page in liferayportlet

First you need to import this liferayportlet package in your JSP page:

<%@ page import="com.liferay.portal.util.PortalUtil" %>

HttpServletRequest myReq = PortalUtil.
getOriginalServletRequest(PortalUtil.getHttpServletRequest(renderRequest));
String myid = myReq.getParameter("myid")
;
out.println("myid="+myid);