ActiveWeb will recompile and reload routes and controllers on each request in development environment. It makes it possible to experiment with controllers, pages and routes in a live application without having to restart the container. Watch the video on the ActiveWeb for an example. All that is required is a system property active_reload to be set.

Since production environments do not have compiler, or active_reload system property, the framework simply executes previously compiled and packaged controllers and routes.

Jetty configuration

Starting a project in development mode is easy, just type:

mvn jetty:run

The Jetty plugin is configured by default, and there is almost nothing in configuration of this plugin that is specific to ActiveWeb, except some system properties, see below

System properties with Jetty

Typical configuration of the Jetty plugin:

In the configuration above, there are three system properties configured:

  • activejdbc.log - this is related to ActiveJDBC, for more information, please refer to: ActiveJDBC Logging. If you do not use ActiveJDBC, you can remove it.
  • active_reload - this property if set to true, causes ActiveWeb to recompile and reload a controller being executed.
  • activeweb.log.request - this property will enable short information logged from ActiveWeb about each request. It is recommended to have it on.

Running with Tomcat Maven plugin

In some cases you might want to develop on Tomcat. This is useful if your target deployment in production is also Tomcat, and you might want to catch some Tomcat-related problems sooner rather than later. Here is default configuration for Tomcat:

Running is as easy as with Jetty:

mvn tomcat7:run

The same system properties are configured here as for Jetty. For more information on Tomcat plugin, please refer to: Tomcat plugin.

The Tomcat plugin has a tools.jar dependency configured. It is necessary for ActiveWeb in order to recompile controllers. If you remove active_reload property, you can also remove this dependency, but then there will be no code refresh in development environment.


How to comment

The comment section below is to discuss documentation on this page.

If you have an issue, or discover bug, please follow instructions on the Support page