O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The BlobWriter Class

The BlobWriter class is the utility class used by the BlobView servlet. This class contains the methods that perform the task of retrieving the BLOB column for viewing. Unlike some of the other utility classes, this class takes on the responsibility of establishing a connection to the database and creating the prepared statement to use in the database operation. The code for this class is shown in the next few sections.

The BlobWriter Class: The Class Declaration and the main Program Block

The main class declaration for the BlobWriter class performs the imports we expect to access JNDI naming services and to use the JDBC API. For convenience, instance members are created for a JDBC Connection reference and for a PreparedStatement ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required