All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oncore.StudentSession

java.lang.Object
   |
   +----oncore.Session
           |
           +----oncore.StudentSession

public class StudentSession
extends Session
Class to model a student session. This class has session as base class


Constructor Index

 o StudentSession(HttpServletRequest, Connection)
Makes a new StudentSession fot the request req.

Method Index

 o printFirst(PrintWriter)
This is the function that is called from outside when the session starts.
 o processQuery(HttpServletRequest, PrintWriter)
This method is called from outside to process a request.

Constructors

 o StudentSession
 public StudentSession(HttpServletRequest req,
                       Connection con) throws ValidationException, SQLException
Makes a new StudentSession fot the request req. Sets the member semno by reading the Configuration. This constructor executes a query on database to precompute and store the group number of the student.

Parameters:
req - This is HttpServletRequest got by doPost.
con - Database connection established by the servlet.
Throws: ValidationException
Thrown when authentication fails.
Throws: SQLException
Thrown because of some database problems while trying to authenticate the student.

Methods

 o printFirst
 public void printFirst(PrintWriter out) throws SQLException
This is the function that is called from outside when the session starts. Not called through processQuery

Parameters:
out - Printwriter to write html stuff to.
Throws: SQLException
thrown if we go wring somewhere while executing a query on database
Overrides:
printFirst in class Session
 o processQuery
 public void processQuery(HttpServletRequest req,
                          PrintWriter out) throws SQLException
This method is called from outside to process a request. Depending on the current phase calls other functions

Parameters:
req - request from user when she submits a form.
out - Printwriter to write html stuff to.
Throws: SQLException
thrown if we go wring somewhere while executing a query on database
Overrides:
processQuery in class Session

All Packages  Class Hierarchy  This Package  Previous  Next  Index