Sheldon's Server-Side JDBC Servlet

About the Author

My name is Sheldon Bradley Wosnick and I currently work for IBM Canada in the e-business Internet Integration department of IBM Global Services. Having had significant previous experience with Enterprise Java development , I have been on assignment for the last seven months at the Toronto IBM Lab working first on the VisualAge for Java 1.0 development team and more recently as a core Java developer on the upcoming VisualAge e-business suite which will feature, in part, VisualAge for Java 1.0 Enterprise Edition and the new release of DB2 Universal Database 5.0.

My primary responsibilities on the VisualAge for Java team involved development and software verification testing of the JDBC-ODBC Bridge, used within VisualAge for Java for enterprise database connectivity via ODBC database drivers. This involved the Java development of an entire suite of Java database test programs which exercised all aspects of the Java Database Connectivity (JDBC) API via ODBC. I have learned a great deal about VisualAge for Java, Java, JDBC and ODBC as well had the opportunity to do some serious Enterprise and Distributed Java development.

For VisualAge e-business our team is currently integrating the best-of-breed Enterprise and Web software development tools from IBM, Lotus and NetObjects. These tools are designed to meet the requirements of the professional Java developer seeking a total solution for e-business applications development. Our intention is to demonstrate how these developer tools can be combined to produce serious, real Enterprise e-business Internet and Intranet solutions. I really believe we have a winner here!

My current responsibilities include Java development of the Enterprise scenarios using IBM DB2 Universal Database 5.0 and Java server-side programming with Java servlets and CORBA distributed objects using CORBA with the Internet InterORB Protocol (IIOP) and VisualAge for Java Enterprise Edition.

Please note that I am totally representing myself here and I do not in any way represent any past, present or future views or strategies of IBM. Any and all misrepresentation of information is solely my doing. Information about either VisualAge for Java or VisualAge e-business that I have discussed here is readily available information published on our external website at www.ibm.com/java. Any code submitted is to the public domain and constitutes programming that I have done in my spare time, some before joining IBM and other done strictly offline, after hours, to expand my knowledge of servlets and server-side Java programming. (Have I been clear enough on this matter -- hopefully!).

Introduction

This rather simple "Universal" client HTML form is used as the front-end client to call upon the services of a 100% Pure Java servlet operating on a server back-end somewhere (which is presumably connected to some DBMS and database server). Any level of distribution is possible; for example, the servlet may call upon another servlet running on a different server which calls upon the database server etc. Alternatively, the servlet may initialize a CORBA Object Request Broker (ORB) and communicate via the Internet Inter-ORB Protocol (IIOP) with any number of fully distributed, remote objects which could perform any number and kind of operation(s) at the back-end. The uses are truly limitless! Servlets are a much better replacement for CGI/HTTP and there are a multitude of documents on the Web which testify to the superiority of the 'Pure Java' approach with servlets.

Using a servlet to perform JDBC database connectivity and database access as I have in this sample servlet means that the client downloaded to the Web browser is an "ultra thin" client -- a minimal amount of program logic (easily decompilable intellectual capital) is actually downloaded from the Web server to it resulting in less calls from the client to the server (to perform intensive database operations) and less HTTP network traffic. In addition, the intellectual capital is preserved as the client never gets any of this bytecode at the client Web browser.

Using the JDBC Database Access Servlet

The easiest way to try out this servlet is to to:

Sheldon Bradley Wosnick, 1997. Comments and feedback welecome. EMAIL: swosnick@ca.ibm.com.


n-tier (multi-tier) approach in which servlets will be important

network.gif (6945 bytes)


To use my data access servlet first enter the following connection information:

User ID:  Password:

Database:   Table:

JDBC Driver:    URL:

Query   Update


Next, enter the SQL query or command here: