Generating Graphics with WebObjects

In this section we're going to revisit the Hello application. This time however, we're going to vend the greeting response as a SVG graphic.

Vending SVG Content

Start by duplicating the HelloDirect application to SVGHelloDirect or something similar. You'll find more on this in Chapter 4, “Building Bookmarkable Applications.”

Edit the Greeting HTML template in WebObjects Builder source mode. Copy the following SVG into it from the file named Stripes.svg located in the file download of the Web site companion to the book (www.samspublishing.com).

 <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd"> ...

Get WebObjects® Developer's Guide 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.