Authenticating that way is called HTTP BASIC, which may help with your searching :)
Essentially you need an element in your web.xml like this
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>myRealm</realm-name>
</login-config>
Then you need to set up a realm for your users:
http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#Configuring%20a%20Realm
Then you need to create some users in the tomcat-users.xml file
Now you can start using <security-constraint>
elements in your web.xml to manage access.
As an aside, with modern browsers, you must actually use container managed security if you want to use BASIC. Sometimes people try to parse the request in a servlet and get a username/password out of it. Modern browsers will 'protect' you from disclosing your password needlessly by not putting the login and password in the header unless an initial call to the server without it fails with a challenge for BASIC credentials.