@Retention(value=RUNTIME) @Target(value=TYPE) public @interface DefaultController
A controller annotated with this annotation is flagged as the default controller for all application requests not specifying a controller. Only one controller in the application can be annotated with this annotation.
As an example, consider the following controller:
@DefaultController
@StatelessController("test")
public class SomeController {
@DefaultAction
public View someAction() {
return new JSP("test");
}
}
We can invoke the someAction method by making the following request:
http://.../
Since there was no controller name supplied, the default controller was used as the controller for the request.
Copyright © 2011-2012 MojaveMVC.org