StringBuffer outStr = new StringBuffer();  PrivilegedSubject loggedInPrivilegedSubject = (PrivilegedSubject) (request.getSession().getAttribute(Constants.LOGGEDINUSER_ATTRNAME));  outStr.append("<a href=\"DemoLogout.do\">\n"); outStr.append(loggedInPrivilegedSubject.getName());  if (!loggedInPrivilegedSubject.equals (loggedInPrivilegedSubject.getEffectiveEditor())) { outStr.append (" <span id=\"actingas\" class=\"actingas\">acting as " + loggedInPrivilegedSubject.getEffectiveEditor().getName() + "</span>"); }  outStr.append(" : Logout\n"); outStr.append("</a>\n");  return outStr.toString();
return "<a href=\"Logout.do\">Logout</a>\n";
  static public String displayLogoutHref(HttpServletRequest request)  {    StringBuffer outStr = new StringBuffer();        PrivilegedSubject loggedInPrivilegedSubject      = (PrivilegedSubject)          (request.getSession().getAttribute(Constants.LOGGEDINUSER_ATTRNAME));        outStr.append("<a href=\"DemoLogout.do\">\n");    outStr.append(loggedInPrivilegedSubject.getName());    if (!loggedInPrivilegedSubject.equals          (loggedInPrivilegedSubject.getEffectiveEditor()))    {      outStr.append        (" <span id=\"actingas\" class=\"actingas\">acting as "         + loggedInPrivilegedSubject.getEffectiveEditor().getName()         + "</span>");    }        outStr.append(" : Logout\n");    outStr.append("</a>\n");        return outStr.toString();  }