docs: protected void doGet( HttpServletRequest req, HttpServletResponse resp )
          throws ServletException, IOException
      {
          String path = req.getPathInfo();
          String context;
          if ( path == null )
          {
              path = req.getServletPath();
              context = req.getContextPath();
          }
          else
          {
              context = req.getContextPath() + req.getServletPath();
          }
          
          if ( path.equals( "/" + settingsServletPath ) )
          {
              resp.setContentType( "text/xml" );
              PrintWriter w = resp.getWriter();
              
              Reader settingsReader = null;
              try 
              {
                  String hostAddress;
                  try
                  {
                      hostAddress = InetAddress.getLocalHost().getHostAddress();
                  }
                  catch ( UnknownHostException e )
                  {
                      hostAddress = req.getServerName();
                  }
  
                  String repositoryProxyUrl = req.getScheme() + "://" + hostAddress + ":" + req.getServerPort(); 
                  Reader in = new InputStreamReader( FileSystemServlet.class.getResourceAsStream( "/settings-mrm.xml" ) );
                  settingsReader = new InterpolationFilterReader( in, Collections.<String, Object>singletonMap( "repository.proxy.url", repositoryProxyUrl ), "@", "@" );
                  IOUtil.copy( settingsReader, w );
              }
              finally
              {
                  IOUtil.close( settingsReader );
              }
              return;
          }
          
          Entry entry = fileSystem.get( path );
          if ( entry instanceof FileEntry )
          {
              FileEntry fileEntry = (FileEntry) entry;
              long size = fileEntry.getSize();
              if ( size >= 0 && size < Integer.MAX_VALUE )
              {
                  resp.setContentLength( (int) size );
              }
              resp.setContentType( getServletContext().getMimeType( fileEntry.getName() ) );
              InputStream source = null;
              OutputStream destination = null;
              try
              {
                  source = fileEntry.getInputStream();
                  destination = resp.getOutputStream();
                  IOUtils.copy( source, destination );
              }
              finally
              {
                  IOUtils.closeQuietly( source );
                  IOUtils.closeQuietly( destination );
              }
              return;
          }
          else if ( entry instanceof DirectoryEntry )
          {
              if ( !path.endsWith( "/" ) )
              {
                  resp.sendRedirect( entry.getName() + "/" );
                  return;
              }
              DirectoryEntry dirEntry = (DirectoryEntry) entry;
              Entry[] entries = fileSystem.listEntries( dirEntry );
              resp.setContentType( "text/html" );
              PrintWriter w = resp.getWriter();
              w.println( "<html>" );
              w.println( "  <head>" );
              w.println( "    <title>Index of " + context + path + "</title>" );
              w.println( "    <meta http-equiv=\"Content-Type\" repository=\"text/html; charset=utf-8\"/>" );
              w.println( "</head>" );
              w.println( "<body>" );
              w.println( "<h1>Index of " + context + path + "</h1>" );
              w.println( "  <hr/>" );
              w.write( "<pre>" );
  
              if ( dirEntry.getParent() != null )
              {
                  w.println( "<a href='../'>../</a>" );
              }
              SimpleDateFormat format = new SimpleDateFormat( "dd-MMM-yyyy hh:mm" );
              if ( entries != null )
              {
                  for ( int i = 0; i < entries.length; i++ )
                  {
                      final String childName = entries[i].getName();
                      boolean directory = entries[i] instanceof DirectoryEntry;
                      if ( directory )
                      {
                          String dirName = childName + "/";
                          w.write(
                              "<a href=\"./" + Utils.urlEncodePathSegment( childName ) + "/\">" + formatName( dirName )
                                  + "</a>" + StringUtils.repeat( " ",
                                                                 Math.max( 0, NAME_COL_WIDTH - dirName.length() ) ) );
                      }
                      else
                      {
                          w.write(
                              "<a href=\"./" + Utils.urlEncodePathSegment( childName ) + "\">" + formatName( childName )
                                  + "</a>" + StringUtils.repeat( " ",
                                                                 Math.max( 0, NAME_COL_WIDTH - childName.length() ) ) );
                      }
  
                      long timestamp = 0;
                      try
                      {
                          timestamp = entries[i].getLastModified();
                      }
                      catch ( IOException e )
                      {
                          // ignore
                      }
  
                      w.write( " " );
                      w.write( format.format( timestamp != -1 ? new Date( timestamp ) : new Date() ) );
                      if ( directory )
                      {
                          w.println( StringUtils.leftPad( "-", SIZE_COL_WIDTH ) );
                      }
                      else if ( entries[i] instanceof FileEntry )
                      {
                          FileEntry fileEntry = (FileEntry) entries[i];
                          try
                          {
                              long size = fileEntry.getSize();
                              if ( size >= 0 )
                              {
                                  w.println( StringUtils.leftPad( Long.toString( size ), SIZE_COL_WIDTH ) );
                              }
                              else
                              {
                                  w.println( StringUtils.leftPad( "-", SIZE_COL_WIDTH ) );
                              }
                          }
                          catch ( IOException e )
                          {
                              w.println( StringUtils.leftPad( "-", SIZE_COL_WIDTH ) );
                          }
                      }
                      else
                      {
                          w.println( StringUtils.leftPad( "-", SIZE_COL_WIDTH ) );
                      }
                  }
              }
              w.write( "</pre>" );
              w.println( "  <hr/>" );
              w.println( "</body>" );
              w.println( "</html>" );
              return;
          }
  
          resp.sendError( HttpURLConnection.HTTP_NOT_FOUND );
      }