← Overview | Circumflex Web Framework Documentation | Basic Concepts → |
Circumflex web applications run in standard Servlet 2.5 containers. There's a couple of things you should do in order to start using Circumflex Web Framework.
If you use Maven for building your project, add following lines to pom.xml
(or merge XML sections accordingly):
<properties>
<cx.version><!-- desired version --></cx.version>
</properties>
<dependencies>
<dependency>
<groupId>ru.circumflex</groupId>
<artifactId>circumflex-web</artifactId>
<version>${cx.version}</version>
</dependency>
</dependencies>
If you prefer SBT, make sure that libraryDependencies
of your project contains following artifact:
"ru.circumflex" % "circumflex-web" % cxVersion % "compile->default"
where cxVersion
points to desired Circumflex version. Here's the sample project configuration:
import sbt._
class MyProject(info: ProjectInfo) extends DefaultWebProject(info) {
val cxVersion = "2.0"
override def libraryDependencies = Set(
"ru.circumflex" % "circumflex-web" % cxVersion % "compile->default"
) ++ super.libraryDependencies
}
You can follow SBT Setup Guide to create a new project.
Note that first-time builds usually require a substantial amount of dependencies downloads.
Configure the main request router of your application by setting cx.router
configuration parameter:
via src/main/resources/cx.properties
file:
cx.router=com.myapp.web.MainRouter
pom.xml
using Circumflex Maven Plugin.Please refer to Circumflex Configuration API for more information on how to configure your application.
All code examples assume that you have following import
statement in code where necessary:
import ru.circumflex._, core._, web._
← Overview | Circumflex Web Framework Documentation | Basic Concepts → |