public void doGet(HttpServletRequest req, HttpServletResponse resp)   
    throws ServletException, java.io.IOException{
    java.io.PrintWriter pw=resp.getWriter();
    try {
    
      //Get path:
      Path path=getContentPath(req);
      if (path==null){
        resp.sendError(resp.SC_NOT_FOUND, req.getRequestURI());
        return;
      }

      //Get caching headers on source & destination:
      String eTag=req.getHeader("If-None-Match"),
             newTag=Long.toHexString(templateMgr.getETag(path));
             
      //Return 304 on no change:
      if (eTag!=null && newTag.equals(eTag)){
        Log.info("Returning 304 for "+path);
        resp.setStatus(resp.SC_NOT_MODIFIED);
        return;//RETURN;
      }
      
      //Get updated content as necessary:
      Content content=contentMap.get(path);
      if (content==null || !newTag.equals(content.eTag)) { 
        content=new Content();
        content.text=templateMgr.getTemplate(path, false).toString();
        content.eTag=newTag;
        contentMap.put(path, content);
      }
      
      //Send back to suer
      Log.info("ContentViewer.doGet(): Sending content, and eTag "+newTag);
      resp.setHeader("ETag", newTag);
      pw.write(content.text);
      pw.flush();
    } catch (Exception e) {
      StringBuilder sb=new StringBuilder();
      getExceptionText(sb, e);
      Log.error("ContentViewer.doGet() ", sb.toString());
      displayError(pw, e);
    }
  }