|
Using JDBC in servlets
One of the most common uses of servlets is to access corporate information residing in a database; some studies suggest that up to 80% of all applications utilize some type of data stored in a relational database. In this chapter we’ll explore JDBC, JavaSoft’s API specification for connecting to databases and manipulating data, and how to use database information from within servlets.
|
|
Closing a database connection from a servlet
Is anyone familiar with a destroy function (listed below). Should I call this at the end of each servlet, in order to sever the connection to the database, as I re-establish it in every servlet ?
|
|
Database access with servlets and Jdbc
The most used way of accessing databases or any other server resources from an HTML page until now has been CGI scripting with Perl, Tcl or Python; the main reason for this is that CGI scripting was the only way to accomplish such a task.
Nowadays we have a broader range of options available for server side processing like Active Server Pages or Servlets.
|
|
Servlets and JDBC
This tutorial will guide you through creating a Servlet front end to a database.
|
|
Using Java Servlets with Database Connectivity
The Common Gateway Interface (CGI) has and continues to be the most commonly used method for creating dynamic and responsive web pages. The main problem with CGI (that stems from the Hyper-Text Transfer Protocol) is that each new client request results in a new instance of the CGI executable being forked by the HTTP daemon. This can lead to considerable resource consumption on web hosting machinery. Many solutions exist to address this problem, most focusing on keeping the executable persistent between client requests. This has the added benefit of holding open costly resources like database and socket connections.
|