Skip to Content
Clojure Programming
book

Clojure Programming

by Chas Emerick, Brian Carper, Christophe Grand
April 2012
Intermediate to advanced content levelIntermediate to advanced
628 pages
18h 42m
English
O'Reilly Media, Inc.
Content preview from Clojure Programming

Chapter 17. Deploying Clojure Web Applications

Once you’re past a certain point of competence with Clojure and are on your way toward having a working application completed, you’ll inevitably need to deliver its functionality to your users and customers. The modern era has tilted distribution norms toward server-side deployments (often “in the cloud”) that clients interact with via web services and interfaces. In this chapter, we’ll explore the various ways one can package and then deploy Clojure web applications, taking full advantage of the mature facilities that the JVM and Java ecosystem provide for doing so.[413]

Java and Clojure Web Architecture

Almost without exception, Clojure web applications are packaged and deployed as servlets, the same fundamental architecture used by web applications written in Java. Web servlets are simply Java classes that extend the javax.servlet.http.HttpServlet base class, which defines a programmatic interface for handling HTTP requests. There are methods for each HTTP request method (GET, POST, and so on), each of which accept request and response objects; each HTTP request method implementation examines the incoming request and coordinates the writing out of the response contents. Applications that follow the servlet specification (which boils down to implementing a single Java interface and following some packaging conventions) can be deployed as web applications to any of many dozens of app servers, many of which offer a variety of specialized ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Clojure Applied

Clojure Applied

Ben Vandgrift, Alex Miller
Clojure Programming Cookbook

Clojure Programming Cookbook

Makoto Hashimoto, Nicolas Modrzyk
Practical Clojure

Practical Clojure

Luke VanderHart, Stuart Sierra
Programming Clojure, 2nd Edition

Programming Clojure, 2nd Edition

Stuart Halloway, Aaron Bedra

Publisher Resources

ISBN: 9781449310387Errata PageSupplemental Content