Where are courses and students coming from? Are you sure they contain any data? Your logic is also a bit funny. You want multiple rows inside the table, but your <tr> starts outside of the loop, so you will always have exactly one, and if courses and students have more than one element each, you're going to get a lot more <td> on that row than you expect. Are you sure you have to display both sets in a single table?
Also, just to satisfy my curiosity, did your teacher tell you to use scriptlets?
In a java file I retrieve students from the database and insert them into ArrayList called "students". I retrieve courses from the database and insert them into ArrayList called "students".
I have 2 JSP files which display 2 forms, one for students and one for courses. User types there courses and students. Then they are inserted into database and ArrayLists via methods in the java files.
In this JSP file I posted here I retrieve the students and courses from the 2 ArrayLists and display them into a HTML table. I mean I'm TRYING that :p
OK, so student and courses are being loaded from the database in Java code, but how do they get to your JSP? And what triggers them to be loaded? Are you sure that part is happening and is working correctly?
The only way showing students and courses in a single table makes sense to me is if you were showing the students enrolled in the courses. In that case, your Java code that loads from the database would be running a join query, which would associate data from the STUDENT table and the COURSE table, probably using an ENROLLMENT link table. Does that sound like something that was part of the assignment?