weavejester/lein-ring — pull request #108 by cdpjenkins (2014-05-24 15:40:10+00:00)
Title: Write correct attributes into web.xml to say which version of the servlet spec we conform to

Hi James,

I was having trouble getting an uberjar created by lein-ring to run in a WebSphere Liberty app server. It turns out that the web.xml wasn't conforming with the servlet spec; it didn't specify the version and associated namespace on the element. Reading through the spec, it looks like this is required to be included and Liberty was refusing to run the web app without it.

For example, the following is required by version 2.5 of the spec:

The code change in this pull request adds an extra key to the :ring section of project.clj called :servlet-version. lein ring uberjar then spits out the correct web-app attributes for the version of the spec that you specify, provided that version is 2.4, 2.5 or 3.0. Note that I haven't made any effort to make the app conform to the spec in any other way; this change just makes the web.xml *claim* that it conforms to a particular version of the spec.

For each of these versions, the resulting uberwar file runs successfully in my WebSphere Liberty 8.5.5 server.

Please let me know if you'd be willing to include this patch or if I need to make any changes to it (and please be patient with me because this is my first contribution to a Clojure project :-).