다음 예는 407 오류 코드가 클라이언트 브라우저로 전송되는 방법을 보여줍니다. 그런 다음 브라우저에 "인증 필요!!! " 메시지.
<html>
<head>
<title>Setting HTTP Status Code</title>
</head>
<body>
<%
// Set error code and reason.
response.sendError(407, "Need authentication!!!" );
%>
</body>
</html> 다음 출력을 받게 됩니다 -
HTTP Status 407 - Need authentication!!!
type Status report
message Need authentication!!!
description The client must first authenticate itself with the proxy (Need authentication!!!).
Apache Tomcat/5.5.29