Hi guys, I have written a servlet, and applied BASIC authentication on it, so whenever any one tries to access it, it asks the username and password to authenticate the users. Now, the problem is, i would like to access the servlet using URLConnection class, and i am not able to know how to pass the username and password to servlet using URLConnection. Please help me. Thanks in Advance. Loke.