In login page i make validation that user is allowed to enter system , i make methode which validate user:
boolean isValidUser(Connection con,String userName,String pass ){}
it works correctly in desktop Application, but when i tried it in servlet it makes exception that table or view doesn't exist ??? but the table is aleady exist in my db ?? Can somebody tell me where is the problem?
this is the method
public boolean isValidUser(Connection con,String userName,String pass )throws SQLException
{
String selSQL="SELECT USER_NAME, USER_PASS FROM OSQS_USERS where USER_NAME =? and USER_PASS =?";
ResultSet rs =null;
boolean exist =false;
PreparedStatement pstmt = null;
try {
pstmt = con.prepareStatement(selSQL);
pstmt.setString(1,userName);
pstmt.setString(2, pass);
rs=pstmt.executeQuery();
if(rs.next())
exist= true;
}
//close statment and result sest
return exist;
}