Accessing Databases from Web Applications

Data that is shared between Web components and is persistent between invocations of a Web application is usually maintained in a database. Web applicationsuse the JDBC API to access relational databases. For information on this API, see

http://java.sun.com/docs/books/tutorial/jdbc

In the JDBC API, databases are accessed via DataSource objects. A DataSource has a set of properties that identify and describe the real world data source that it represents. These properties include information such as the location of the database server, the name of the database, the network protocol to use to communicate with the server, and so on.

Web applications access a data source using a connection, and a DataSource ...

Get The J2EE™ Tutorial Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.