Returns a connection to a database as configured earlier.
This method can be used by all the jsps to get a connection.
The jsps do not have to worry about which db to connect to etc.
This has been configured in this class by the InitServlet.
Deprecated. Returns a connection to a database as configured earlier.
This method can be used by all the jsps to get a connection.
The jsps do not have to worry about which db to connect to etc.
This has been configured in this class by the InitServlet.
Deprecated. Gets a connection to the specific database as given in configuration file.
First it checks connection to which database is required
then it calls the appropriate getConnection method
In real world applications,some sort of connection pooling mechanism
would be used for getting the connection and proper care would be taken to
close it when the work is done.
Deprecated. Opens the connection to the Access Database
The complete path to the mdb comes from configuration file web.xml.
Here we are just printing the stack trace in case of any exception.
In real world applications,some kind of exception-handling needs to be done.
Further,in real world applications,some sort of connection pooling mechanism
would be used for getting the connection and proper care would be taken to
close it when the work is done.
Opens the connection to the MySQL Database
Using the DataSource Name specified in the config file of the server in which it is deployed.
In real world applications,some sort of connection pooling mechanism
would be used for getting the connection and proper care would be taken to
close it when the work is done.
Deprecated. Opens the connection to the MySQL Database
Using the DataSource Name specified in the config file of the server in which it is deployed.
In real world applications,some sort of connection pooling mechanism
would be used for getting the connection and proper care would be taken to
close it when the work is done.