This example explains how to use basic authentication with a servlet. With basic authentication of a servlet, the web browser presents a standard login dialog .