else
else if( collLinks )
    public int doStartTag() throws JspException    {        ServletRequest request = pageContext.getRequest();        // header file        String header = "/layout/header-default.jsp";        // Choose default style unless one is specified        if (style != null)        {            header = "/layout/header-" + style.toLowerCase() + ".jsp";        }        // Sort out location bar        if (locbar == null)        {            locbar = "auto";        }        // These lists will contain titles and links to put in the location        // bar        List parents = new ArrayList();        List parentLinks = new ArrayList();        if (locbar.equalsIgnoreCase("off"))        {            // No location bar            request.setAttribute("dspace.layout.locbar", new Boolean(false));        }        else        {            // We'll always add "DSpace Home" to the a location bar            parents.add(ConfigurationManager.getProperty("dspace.name"));            if (locbar.equalsIgnoreCase("nolink"))            {                parentLinks.add("");            }            else            {                parentLinks.add("/");            }            // Add other relevant components to the location bar            if (locbar.equalsIgnoreCase("link"))            {                // "link" mode - next thing in location bar is taken from                // parameters of tag, with a link                if (parentTitle != null)                {                    parents.add(parentTitle);                    parentLinks.add(parentLink);                }                else if (parentTitleKey != null)                {                    parents.add(LocaleSupport.getLocalizedMessage(pageContext,                            parentTitleKey));                    parentLinks.add(parentLink);                }            }            else if (locbar.equalsIgnoreCase("commLink"))            {                // "commLink" mode - show all parent communities                Community[] comms = (Community[]) request                        .getAttribute("dspace.communities");                if (comms != null)                {                    for (int i = 0; i < comms.length; i++)                    {                        parents.add(comms[i].getMetadata("name"));                        parentLinks.add("/handle/" + comms[i].getHandle());                    }                }            }            else if (locbar.equalsIgnoreCase("nolink"))            {                // "nolink" mode - next thing in location bar is taken from                // parameters of tag, with no link                if (parentTitle != null)                {                    parents.add(parentTitle);                    parentLinks.add("");                }            }            else            {                // Grab parents from the URL - these should have been picked up                // by the HandleServlet                Collection col = (Collection) request                        .getAttribute("dspace.collection");                Community[] comms = (Community[]) request                        .getAttribute("dspace.communities");                if (comms != null)                {                    for (int i = 0; i < comms.length; i++)                    {                        parents.add(comms[i].getMetadata("name"));                        parentLinks.add("/handle/" + comms[i].getHandle());                    }                    if (col != null)                    {                        parents.add(col.getMetadata("name"));                        parentLinks.add("/handle/" + col.getHandle());                    }                }            }            request.setAttribute("dspace.layout.locbar", new Boolean(true));        }        request.setAttribute("dspace.layout.parenttitles", parents);        request.setAttribute("dspace.layout.parentlinks", parentLinks);        // Navigation bar: "default" is default :)        if (navbar == null)        {            navbar = "default";        }        if (navbar.equals("off"))        {            request.setAttribute("dspace.layout.navbar", "off");        }        else        {            request.setAttribute("dspace.layout.navbar", "/layout/navbar-"                    + navbar + ".jsp");        }        // Set title        if (title != null)        {            request.setAttribute("dspace.layout.title", title);        }        else if (titleKey != null)        {            request.setAttribute("dspace.layout.title", LocaleSupport                    .getLocalizedMessage(pageContext, titleKey));        }        else        {            request.setAttribute("dspace.layout.title", "NO TITLE");        }                // Set feedData if present        if (feedData != null && ! "NONE".equals(feedData))        {            // set the links' reference - community or collection        	boolean commLinks = feedData.startsWith("comm:");        	if ( commLinks )        	{                Community com = (Community)request.getAttribute("dspace.community");        		request.setAttribute("dspace.layout.feedref", com.getHandle());        	}        	else        	{        		Collection col = (Collection)request.getAttribute("dspace.collection");        		request.setAttribute("dspace.layout.feedref", col.getHandle());        	}        	// build a list of link attributes for each link format        	String[] formats = feedData.substring(feedData.indexOf(":")+1).split(",");        	List linkParts = new ArrayList();        	// each link has a mime-type, title, and format (used in href URL)        	for (int i = 0; i < formats.length; i++)        	{        		if("rss_1.0".equals(formats[i]))        		{        			linkParts.add("rdf+xml");        		}        		else        		{        			linkParts.add("rss+xml");        		}        		if (commLinks)        		{        			linkParts.add("Items in Community");        		}        		else        		{        			linkParts.add("Items in Collection");        		}        		linkParts.add(formats[i]);        	}        	request.setAttribute("dspace.layout.linkparts", linkParts);        }        else        {        	request.setAttribute("dspace.layout.feedref", "NONE" );        }        // Now include the header        try        {            HttpServletResponse response = (HttpServletResponse) pageContext                    .getResponse();            // Set headers to prevent browser caching, if appropriate            if ((noCache != null) && noCache.equalsIgnoreCase("true"))            {                response.addDateHeader("expires", 1);                response.addHeader("Pragma", "no-cache");                response.addHeader("Cache-control", "no-store");            }            // Ensure the HTTP header will declare that UTF-8 is used            // in the response.            response.setContentType("text/html; charset=UTF-8");            ServletConfig config = pageContext.getServletConfig();            RequestDispatcher rd = config.getServletContext()                    .getRequestDispatcher(header);            rd.include(request, response);        }        catch (IOException ioe)        {            throw new JspException("Got IOException: " + ioe);        }        catch (ServletException se)        {            log.warn("Exception", se.getRootCause());            throw new JspException("Got ServletException: " + se);        }        return EVAL_BODY_INCLUDE;    }