PortletContext portletCtx =
(PortletContext)map.get(portlet.getPortletId());
if (portletCtx == null) {
if (portlet.isWARFile()) {
PortletContextWrapper pcw =
PortletContextPool.get(portlet.getPortletId());
ctx = pcw.getServletContext();
}
portletCtx = new PortletContextImpl(ctx);
map.put(portlet.getPortletId(), portletCtx);