*/
public void contextualize(Context context) throws ContextException {
try {
// now get the portal manager
ServletConfig servletConfig = (ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG);
PortletAdapter portalManager = (PortletAdapter) servletConfig.getServletContext().getAttribute(PortletAdapter.class.getName());
if ( portalManager != null ) {
this.environment = portalManager.getPortletContainerEnvironment();
}
} catch (ContextException ignore) {
// we ignore the context exception
// this avoids startup errors if the portal is configured for the CLI
// environment