How controllers and views are working together
In order to build something usefull you need to pass data from a controller to the corresponding view. Actually there is a method in the AbstractController that you need to use:
setContextParameter(String name,Object object);
This object will be added to the velocity context and will be accessible by the name within the view.
Example
We will pick up our example controller TestController and add the following:
public void index() {
setContextParameter("message","Hello world");
}
Now in the web/test/index.vm you can use the object like
<h1>$message</h1>
More
Actually that is all you have to do to pass data to your view. The method described above is mainly a wrapper method to put an object into the velocity context. Everything that applied to the velocity context and velocity will of course apply here as well.