Hi all,

i am new to java servlets. i simply created a login form with username and password fields. now when i deployed it on tomcat server, after i click on submit button it gives the following error:

java.sql.SQLException: Column not found

codin of this login servlet is attached below. i have used username,password,name and address fields in my table(database). i have created it using ms-access.
please reply asap!!!

Recommended Answers

All 2 Replies

Hi ankiwalia and welcome to Daniweb :)

Your SQL syntax is incorrect. Instead of this:

String query="select username and password from Registeredusers";

Try this:

String query="select username, password from Registeredusers";

thank you darkagn..that was really a help...i changed the syntax..and it worked fine!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.