* @param config the servlet config.
* @return the InternalPortletContext associated with the ServletContext.
* @throws PortletContainerException
*/
public String register(ServletConfig config) throws PortletContainerException {
InternalPortletContext portletContext = register(config.getServletContext());
PortletAppDD portletAppDD =
portletContext.getPortletApplicationDefinition();
PortletDD portletDD = null;
LOG.info("Registering "+portletAppDD.getPortlets().size()+" portlets for context "+portletContext.getApplicationId());
for (Iterator it = portletAppDD.getPortlets().iterator(); it.hasNext();) {
portletDD = (PortletDD) it.next();
portletConfigs.put(
portletContext.getApplicationId() + "/" + portletDD.getPortletName(),
new PortletConfigImpl(config, portletContext, portletDD)
);
}
return portletContext.getApplicationId();
}