Hoist FormatType switching into BaseServlet
We want to support rendering to different formats (particularly JSON)
for all views, not just the host index view. At the moment we are still
maintaining a 1:1 mapping between view types and servlets, so supporting
JSON output for a particular already-existing view means putting JSON
code and HTML code in the same servlet class. Return 400s for
unsupported values for ?format= by default.
Change-Id: I5e97b6ba72e310bc66cbfb4a540d94759cbd4273
7 files changed