code: private static void printAttribute(final PrintWriter writer,
  									   final HttpServletRequest request, final String attribute) {
  		writer.println("<tr><td>"
  				+ attribute
  				+ "</td><td>"
  				+ (request.getAttribute(attribute) != null ? request
  				.getAttribute(attribute) : "") + "</td></tr>");
  	}
docs: Prints an error request attribute.
  
  @param writer    print writer to write to
  @param request   servlet request
  @param attribute attribute name