Please refer to the Liftweb.net site for updated getting started instructions
This Getting Started Guide provides you all need to know to create a simple web application with Lift. First we will take a look at the prerequisites and then we will show you how to create and run a Lift project using different development environments. We won’t cover how to develop the Lift way, because that can be found in the User Guide.
Assuming you have Java 5 or higher installed, you can get a Lift web application running in three simple steps:
Download the ‘Lift Basic’ template. If you’re using Git:
sbt> container:start (or sbt.bat container:start on Windows)
Open http://localhost:8080 in a web browser to see the application running.
To understand more about what’s going on here, read on …
Lift is written in Scala which is a modern programming language for the Java virtual machine. You need Java 5 or higher already installed for developing and running Lift projects.
Lift depends on the Servlet API 2.5, hence you need a suitable Servlet container to run a Lift-based web application, e.g. Jetty 6 or 7 or Tomcat 6. However, if you’re using the Lift Basic template (see below), this comes with an embedded Jetty server, so installing a separate container isn’t necessary to get started.
Depending on which development environment you choose it might (Ant) or might not (Maven, SBT, Gradle) be necessary to download the Scala distribution:
Lift itself is a collection of libraries that you add to your project, so other than downloading the libraries there is no initial ‘installation’ of Lift required. If you’re using a build tool such as SBT, the Lift libraries are downloaded automatically as part of your project’s build process.
Running Your First Lift Web Application.
The easiest way to get your first Lift web application up and running is to download the latest ‘Lift Basic’ template and use SBT to build.This template comprises a navigation bar, user management functionality (Login / Sign Up etc), an index page demonstrating a dynamically generated ‘Hello World’ message and a placeholder for static content. So, it’s an ideal place to start experimenting with your own Lift code.
To get the Lift Basic template, if you’re using Git:
git clone git://github.com/lift/lift_25_sbt.git
or without Git, manually download and extract the zip or tar. Then, to build and run:
./sbt (sbt.bat on windows)
The Lift Basic template comes with a SBT launcher, so there’s no need to install sbt separately. The command ‘sbt container:start’ will download all necessary libraries (Scala, Lift, Jetty, etc), compile the application, and then launch Jetty as an embedded application – there’s no need to install Jetty separately. You can then open http://localhost:8080 in a web browser to see the application running.
For more details on using SBT and other build tools see: