How to verify the username and password against a database using servlets

Hi, Im developing a web application for a bank and included is an HTML form that requests the username and password of the user. I want the page to send the username and password to a servlet for validation against a database table already created on my computer. Please can you help me with complete code that shows the validation process against an SQLServer 2000 database-I've been having problems with this for a while now. Thanks.

[443 byte] By [Ayxyza] at [2007-11-26 17:08:22]
# 1
> Please can you help me with complete codeWhat are you offering in return?
CarrieHunta at 2007-7-8 23:36:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Why don't you just explain your problem and post what you have, instead of us wasting our time writing complete code that isn't going to satisfy your requirements?

And by the way, what you are asking about is JDBC and it is almost certainly irrelevant that you happen to be running the code in a servlet.

DrClapa at 2007-7-8 23:36:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

> Why don't you just explain your problem and post what

> you have, instead of us wasting our time writing

> complete code that isn't going to satisfy your

> requirements?

>

> And by the way, what you are asking about is JDBC and

> it is almost certainly irrelevant that you happen to

> be running the code in a servlet.

Cripes. You never heard of being polite? At least you could use some etiquette.

javahockeya at 2007-7-8 23:36:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
> Cripes. You never heard of being polite? At least you> could use some etiquette.What exactly was impolite about that?
DrClapa at 2007-7-8 23:36:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

hi,

you said you have been having problems... what problems? are you sure you have the JDBC drivers and the classpath set? check this out....

about the code... you need to give more details and I can help you out...

the logic is yours... here is how you connect to the SQLServer:

public class Test {

public Test() throws Exception {

DriverManager.registerDriver(new

com.microsoft.jdbc.sqlserver.SQLServerDriver());

Connection connection = DriverManager.getConnection(

"jdbc:microsoft:sqlserver://<Host>:1433",<"UID>","<PWD>");

if (connection != null) {

System.out.println("Successfully connected");

else

System.out.println("Error..");

Check it out..

-- Abdel Raoof Olakara

http://olakara.googlepages.com

Olakaraa at 2007-7-8 23:36:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...