Remarks
The method starts with some boilerplate, session-tracking code.
- We recycle the DBSession from the servlet version of the student database example.
- The pageContext instance variable allows us to retrieve JSP predefined variables like session.
The instance variables sessionID, columns and table correspond to the tag attributes.
- They are initialized in setSession(), setColumns() and setTable() methods, not reproduced here.
The main business is in the executeQuery() method. Its result is placed in another instance variable, rs.
The return value of doStartTag() is determined by rs.next().
- On its first call, this returns true iff the result set is not empty.