I don't know if this the case, but you MUST first call:
rs.next() to get the row from the ResultSet.
Meaning that when you do:
String Instructor = rst.getString("Instructor"); you probably get an exception, go inside catch, and nothing is displayed:
Also about this:
if (Instructor == null)
Sorry, no match for that user in our database. Please try again.
If there is no match the rs.next() will return false. So you need an if statement checking that. If it is false, THEN there is no match. If there is no match then the rs.next() will be false not the Instructor null. If you manage to call rs.next()
and the rst.getString("Instructor") then there was a row returned so there are values to retrieve.
When Instructor is null doesn't mean that there were no rows. It means that you got a row from the database and the table column with name "Instructor" doesn't have a value. Of course if "Instructor" is Primary Key that would be impossible but I am talking in general.
So I suggest, first put some message inside the catch that are printed at the page:
catch (ClassNotFoundException e) {
System.err.println("Could not load database Driver!");
%> <%= e.getMessage()%> <%
} catch (SQLException e) {
System.err.println("Could not connect to to the database!");
%> <%= e.getMessage()%> <%
}
And then and MOST IMPORTANT do whatever you want to do from the beginning but this time follow the tutorial at the top of the JSP forum with title
JSP database connectivity according to Model View Controller (MVC) Model 2