Is your course really teaching you to put scriplets into a JSP??? That's been an obsolete technology for a decade now.
I suppose it's true that it might be helpful to know how that works, in the likely case that you get stuck cleaning up some old application. But the course really ought to be telling you seriously not to use scriptlets in new code. Hopefully that's the case.
Anyway... you have to import the ResultSet class into the JSP, just like you have to import it into Java code which uses it. You haven't done that. Sorry, I can't tell you how to do it because I haven't written JSP code with scriptlets for years now but it should be covered in your course material somewhere.
Surendra, I thank you for your reply. I cannot use servlets for this coursework, as it was discouraged by our professor who expressly requested that we use Java in .jsp pages instead. I do think your point is valid, as I have repeatedly seen the same remark elsewhere.
Coming back to my problem, I get a different error when I add <%@ page import="java.sql.ResultSet" %> to my .jsp page, as suggested by you:
After I posted my initial message, I created another much more simple .jsp page, to try to isolate the problem. It does seem that the problem lies with the class DbConnect.
By the way, I attach some extracts from my course's slides where it says not to use servlets. Personally, I am new to JSP and I therefore do not have a view of my own. But I see the consensus seems to be that servlets are the better solution.
In the real world, it's never a question using one of servlets or JSP; servlets and JSP are always used together. Each is a tool used for its own strengths, just like a carpenter will use both a saw and a drill to get a job done.
In an academic environment things are different to focus effort on a single concept.