docs: @Override
      protected void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
          LOG.debug("Entering");
          final AtomHandler handler = createAtomRequestHandler(req, res);
          final String userName = handler.getAuthenticatedUsername();
          if (userName != null) {
              final AtomRequest areq = new AtomRequestImpl(req);
              try {
                  if (handler.isAtomServiceURI(areq)) {
                      // return an Atom Service document
                      final AtomService service = handler.getAtomService(areq);
                      final Document doc = service.serviceToDocument();
                      res.setContentType("application/atomsvc+xml; charset=utf-8");
                      final Writer writer = res.getWriter();
                      final XMLOutputter outputter = new XMLOutputter();
                      outputter.setFormat(Format.getPrettyFormat());
                      outputter.output(doc, writer);
                      writer.close();
                      res.setStatus(HttpServletResponse.SC_OK);
                  } else if (handler.isCategoriesURI(areq)) {
                      final Categories cats = handler.getCategories(areq);
                      res.setContentType("application/xml");
                      final Writer writer = res.getWriter();
                      final Document catsDoc = new Document();
                      catsDoc.setRootElement(cats.categoriesToElement());
                      final XMLOutputter outputter = new XMLOutputter();
                      outputter.output(catsDoc, writer);
                      writer.close();
                      res.setStatus(HttpServletResponse.SC_OK);
                  } else if (handler.isCollectionURI(areq)) {
                      // return a collection
                      final Feed col = handler.getCollection(areq);
                      col.setFeedType(FEED_TYPE);
                      final WireFeedOutput wireFeedOutput = new WireFeedOutput();
                      final Document feedDoc = wireFeedOutput.outputJDom(col);
                      res.setContentType("application/atom+xml; charset=utf-8");
                      final Writer writer = res.getWriter();
                      final XMLOutputter outputter = new XMLOutputter();
                      outputter.setFormat(Format.getPrettyFormat());
                      outputter.output(feedDoc, writer);
                      writer.close();
                      res.setStatus(HttpServletResponse.SC_OK);
                  } else if (handler.isEntryURI(areq)) {
                      // return an entry
                      final Entry entry = handler.getEntry(areq);
                      if (entry != null) {
                          res.setContentType("application/atom+xml; type=entry; charset=utf-8");
                          final Writer writer = res.getWriter();
                          Atom10Generator.serializeEntry(entry, writer);
                          writer.close();
                      } else {
                          res.setStatus(HttpServletResponse.SC_NOT_FOUND);
                      }
                  } else if (handler.isMediaEditURI(areq)) {
                      final AtomMediaResource entry = handler.getMediaResource(areq);
                      res.setContentType(entry.getContentType());
                      res.setContentLength((int) entry.getContentLength());
                      Utilities.copyInputToOutput(entry.getInputStream(), res.getOutputStream());
                      res.getOutputStream().flush();
                      res.getOutputStream().close();
                  } else {
                      res.setStatus(HttpServletResponse.SC_NOT_FOUND);
                  }
              } catch (final AtomException ae) {
                  res.sendError(ae.getStatus(), ae.getMessage());
                  LOG.debug("An error occured while processing GET", ae);
              } catch (final Exception e) {
                  res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
                  LOG.debug("An error occured while processing GET", e);
              }
          } else {
              res.setHeader("WWW-Authenticate", "BASIC realm=\"AtomPub\"");
              res.sendError(HttpServletResponse.SC_UNAUTHORIZED);
          }
          LOG.debug("Exiting");
      }