Featured Database Articles

Murach's Java Servlets and JSP - Creating an SQL-Java Gateway

This tutorial shows how to create an application that can be used to execute any standard SQL statement against a database that's running on a server. You can use an application like this one to to view and modify the data in a database as you're developing an application. In this article, this application will be referred to as the SQL Gateway application, and it only uses three components: a JSP, a servlet, and a static Java class.

If you're working with a database that's hosted by an ISP, the ISP will usually include an HTML-based way to work with the database that's similar to this application. If not, you can upload this application to work with the database. Either way, this application illustrates most of the principles for using a servlet to access data that's stored in a database on a server.

This tutorial is an excerpt from chapter 11 of Murach's Java Servlets and JSP by Andrea Steelman and Joel Murach. It assumes that you have a basic understanding of the Java language, servlets, and JavaServer Pages. If you don't, you might be interested in Murach's Beginning Java 2 or Murach's Java Servlets and JSP.