নিম্নলিখিত উদাহরণ দেখায় কিভাবে একটি 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