No description or website provided.
Java Shell
Pull request Compare This branch is 23 commits behind aerogear:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

AeroGear Controller - very lean mvc controller

AeroGear Controller is a very lean model view controller written in Java. It focuses on the routing of HTTP request to plain Java object endpoint and the handling of the returned result. The result of an invocation is either forwarded to a view, or returned in the format requested by the caller.


  1. Add the following maven dependency

  2. Since AeroGear Controller uses CDI it is required that a beans.xml file exists in the WEB-INF folder

    <beans xmlns=""


  1. Create a pojo controller

    public class Home {
        public void index() {
  2. Create a Java class containing the routes (must extend AbstractRoutingModule)

    public class Routes extends AbstractRoutingModule {
    public void configuration() {
  3. Create a jsp page at /WEB-INF/pages/<Controller Class Name>/<method>.jsp

    <!-- /WEB-INF/pages/Home/index.jsp -->
            <p>hello from index!</p>

For information about creating RESTful routes, please refer to the user guide.

Populating parameters

You can use immutable beans straight away as controller parameters:

    public class Store {
        public Car save(Car car) {
            return car;

This can be populated by configuring a route to handle POST requests:


And you can use a simple html form for it, by just following the convention:

        <input type="text" name="car.color"/>
        <input type="text" name="car.brand"/>

The car object will be automatically populated with the provided values - note that it supports deep linking, so this would work fine too:

        <input type="text" name="car.brand.owner"/>

All the intermediate objects are created automatically.

This was only a small portion of the features that are available in AeroGear Controller, please refer to the user guide for more information.



Issue Tracker