// get parameters
final MimeRequest params = getParams();
WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(params, "MarkupParams", contextName);
// get portlet handle
PortletContext wsrpPC = getPortletContext();
WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(wsrpPC, "PortletContext", contextName);
org.gatein.pc.api.PortletContext portletContext = WSRPUtils.convertToPortalPortletContext(wsrpPC);
// check locales
final List<String> desiredLocales = params.getLocales();