Login Page

I had a login page and want to authenticate through a Unix file (.txt file).
-----abc.txt------
absvd|sfjlfnfkf
anldnv|asklffdko
------------------
So I want to read the file and check if corresponding username and password matches or not using javascript or JSP. Also tell me in which directory of apache we should put this abc.txt file in which login details are stored.

you want your DocumentRoot directory. look in httpd.conf for this path. after that, you can place it anywhere you want.
example

# view /etc/apache/httpd.conf
...

DocumentRoot "/var/apache2/htdocs"
...

now you can put it in any directory after that path in /var/apache2/htdocs
you could make a directory called test and put it in there. set your permissions and owner.
next, make sure apache is up and then put in your usually address in a browser like 'http://localhost/test/test.html'
you should see your page.