DriverConfiguration driverConfig = (DriverConfiguration)
servletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);
if (isPortletModeAllowed(driverConfig, portletMode)) {
// Retrieve the portal environment.
PortalRequestContext portalEnv = PortalRequestContext.getContext(
(HttpServletRequest) pageContext.getRequest());
PortalURL portalUrl = portalEnv.createPortalURL();
portalUrl.setPortletMode(evaluatedPortletId, new PortletMode(portletMode));
// Build a string buffer containing the anchor tag
StringBuffer tag = new StringBuffer();
// tag.append("<a class=\"" + ToolTips.CSS_CLASS_NAME + "\" href=\"" + portalUrl.toString() + "\">");