displayItem(context, request, response, (Item) dso, handle);
Item item = (Item) dso;  response.setDateHeader("Last-Modified", item .getLastModified().getTime());   long modSince = request.getDateHeader("If-Modified-Since");  if (modSince != -1 && item.getLastModified().getTime() < modSince) {   response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); } else {  displayItem(context, request, response, item, handle); }
    protected void doDSGet(Context context, HttpServletRequest request,            HttpServletResponse response) throws ServletException, IOException,            SQLException, AuthorizeException    {        String handle = null;        String extraPathInfo = null;        DSpaceObject dso = null;        // Original path info, of the form "1721.x/1234"        // or "1721.x/1234/extra/stuff"        String path = request.getPathInfo();        if (path != null)        {            // substring(1) is to remove initial '/'            path = path.substring(1);            try            {                // Extract the Handle                int firstSlash = path.indexOf('/');                int secondSlash = path.indexOf('/', firstSlash + 1);                if (secondSlash != -1)                {                    // We have extra path info                    handle = path.substring(0, secondSlash);                    extraPathInfo = path.substring(secondSlash);                }                else                {                    // The path is just the Handle                    handle = path;                }            }            catch (NumberFormatException nfe)            {                // Leave handle as null            }        }        // Find out what the handle relates to        if (handle != null)        {            dso = HandleManager.resolveToObject(context, handle);        }        if (dso == null)        {            log.info(LogManager                    .getHeader(context, "invalid_id", "path=" + path));            JSPManager.showInvalidIDError(request, response, path, -1);            return;        }        // OK, we have a valid Handle. What is it?        if (dso.getType() == Constants.ITEM)        {            // Display the item page            displayItem(context, request, response, (Item) dso, handle);        }        else if (dso.getType() == Constants.COLLECTION)        {            Collection c = (Collection) dso;            // Store collection location in request            request.setAttribute("dspace.collection", c);            /*             * Find the "parent" community the collection, mainly for             * "breadcrumbs" FIXME: At the moment, just grab the first community             * the collection is in. This should probably be more context             * sensitive when we have multiple inclusion.             */            Community[] parents = c.getCommunities();            request.setAttribute("dspace.community", parents[0]);            /*             * Find all the "parent" communities for the collection for             * "breadcrumbs"             */            request.setAttribute("dspace.communities", getParents(parents[0],                    true));            // home page, or forward to another page?            if ((extraPathInfo == null) || (extraPathInfo.equals("/")))            {                collectionHome(context, request, response, parents[0], c);            }            else            {                // Forward to another servlet                request.getRequestDispatcher(extraPathInfo).forward(request,                        response);            }        }        else if (dso.getType() == Constants.COMMUNITY)        {            Community c = (Community) dso;            // Store collection location in request            request.setAttribute("dspace.community", c);            /*             * Find all the "parent" communities for the community             */            request.setAttribute("dspace.communities", getParents(c, false));            // home page, or forward to another page?            if ((extraPathInfo == null) || (extraPathInfo.equals("/")))            {                communityHome(context, request, response, c);            }            else            {                // Forward to another servlet                request.getRequestDispatcher(extraPathInfo).forward(request,                        response);            }        }        else        {            // Shouldn't happen. Log and treat as invalid ID            log.info(LogManager.getHeader(context,                    "Handle not an item, collection or community", "handle="                            + handle));            JSPManager.showInvalidIDError(request, response, path, -1);            return;        }    }