Chapter 27. Creating On-the-Fly Graphics

Images Aren't Just Static Files

By now you know that you can generate all kinds of output from servlets and Java Server Pages. So far, the one common denominator in the various forms of output has been the fact that they are all readable text. You might be surprised to discover, however, that you can send images from a servlet! Sending an image from a servlet is not the same thing as sending an <img> tag back in an HTML response. Instead, you create an actual JPEG image from inside the servlet and send it back.

Image ...

Get Special Edition Using Java™ Server Pages and Servlets now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.