All Packages Class Hierarchy This Package Previous Next Index
Class oncore.InstrSession
java.lang.Object
|
+----oncore.Session
|
+----oncore.InstrSession
- public class InstrSession
- extends Session
Class models instructor's session. This class has session as the base
class.
-
InstrSession(HttpServletRequest, Connection)
- Constructor for the class InstrSession.
-
printFirst(PrintWriter)
- Method to print the first page for instructor.
-
processQuery(HttpServletRequest, PrintWriter)
- Method to process a query from an html form.
InstrSession
public InstrSession(HttpServletRequest req,
Connection con) throws ValidationException, SQLException
- Constructor for the class InstrSession.
This constructor executes a query on database to precompute and store
all course numbers and course names in vectors.
- Parameters:
- req - This is HttpServletRequest got by doPost.
- con - This is database connection established by init of servlet.
- Throws: ValidationException
- Thrown when can't authenticate
- Throws: SQLException
- Thrown when some database problem occurs
printFirst
public void printFirst(PrintWriter out) throws SQLException
- Method to print the first page for instructor. This method does SQL querying
and collects all the data and presents it in html form. This method is
called in processQuery and also when the instructor logs in for the
first time.
- Parameters:
- out - PrintWriter to write output html to.
- Throws: SQLException
- Thrown when some database problems occur.
- Overrides:
- printFirst in class Session
processQuery
public void processQuery(HttpServletRequest req,
PrintWriter out) throws SQLException
- Method to process a query from an html form. This method is called
every time some update query is sent by instructor. This method does
updates and deletes on database and then calls printFirst to show the
page.
- Parameters:
- req - The HttpServletRequest got by method doPost in servlet
- out - PrintWriter to output html page. this is only passed to
printFirst.
- Overrides:
- processQuery in class Session
All Packages Class Hierarchy This Package Previous Next Index