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 BlobView servlet

The BlobView class as shown in the previous chapter, is a servlet that receives a single parameter that represents an ID number for a movie stored in the database. The ID number is used to find the BLOB record in the database, retrieve it, and write it to the output stream for the HTTP response (see Figure 35-1).

Figure 35-1. The BlobView servlet

The movie ID number (movie_id) is retrieved from a request parameter, so the URL to call the BlobView servlet is as follows:

http://serverName/ServletExamples/BlobView?movie_id=801

The job of finding and retrieving the BLOB and writing it to the output stream is left to an associated ...

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