aarushi2001
Technical User
Hi,
I have a login page with a username and password field. I have two java files:
1. check if username or password or both field are empty or have values.
2. files open the database and checks if the entered value matches with values in the table.
When I use these java files separately, they are throwing respective errors. But when I try and combine them, its giving me an error.
My task is:
If username and password are not empty, check if the value exists in the database.
I need to know how to call my database java file into my validation java file.
My current code is:
if (!user.equals("") && !password.equals("")) {
Beano qb = new Beano();
boolean test = qb.getVal(user,password);
}
on compiling the file, the error I get is:
C:\Program Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\classes\MRI>javac *
ava
MyForm.java:30: unreported exception java.lang.ClassNotFoundException; must be
aught or declared to be thrown
boolean test = qb.doQuery(user,password);
What should I do
I have a login page with a username and password field. I have two java files:
1. check if username or password or both field are empty or have values.
2. files open the database and checks if the entered value matches with values in the table.
When I use these java files separately, they are throwing respective errors. But when I try and combine them, its giving me an error.
My task is:
If username and password are not empty, check if the value exists in the database.
I need to know how to call my database java file into my validation java file.
My current code is:
if (!user.equals("") && !password.equals("")) {
Beano qb = new Beano();
boolean test = qb.getVal(user,password);
}
on compiling the file, the error I get is:
C:\Program Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\classes\MRI>javac *
ava
MyForm.java:30: unreported exception java.lang.ClassNotFoundException; must be
aught or declared to be thrown
boolean test = qb.doQuery(user,password);
What should I do