Source

Jettify / README.txt

::========::
|| README ||
::========::

Project homepage: http://code.google.com/p/bitumenframework/

Jettify is Open Source under Apache 2.0 license - see LICENSE.txt for details.

You can contact me (the developer) by writing to kumar.shantanu (at) gmail.com

::------------------::
|| WHAT IS JETTIFY? ||
::------------------::

Jettify is a tiny Java/Clojure wrapper for Jetty servlet container. You can
use it to embed Jetty in your development environment to run tests. Having
that said, you can also use it to host a web application if you wish.

::------------------------::
|| WHAT ARE THE FEATURES? ||
::------------------------::

1. Create server (optionally passing port number / context while creating)
2. Add servlet with servlet-path
3. Set webapp directory (useful to serve static files or JSPs)
4. Start/stop the server
5. API available in Java and Clojure

::----------------------------------------::
|| HOW DO I USE IT? IS THERE ANY EXAMPLE? ||
::----------------------------------------::

You may need to include some libraries (dependencies) as appropriate while
using Jettify. Those libraries are placed in the lib folder.

In Java,

JettyServer server = new JettyServer();
Servlet s = getServlet();   // your servlet
server.addServlet(s, "/*");
server.start();
// ...and after some time...
server.stop();

In Clojure,

(let [server (jetty-server)
      servlet (get-servlet)]
  (add-servlet server servlet "/*")
  (start-server server)
  ; ... after some time ...
  (stop-server server))


For more details, you can go through the unit tests or documentation.