This code is a very basic Restlet app:
public class FirstStepsApplication extends Application {
private static final String ROOT_URI = "/";
@Override
public Restlet createInboundRoot() {
Router router = new Router(getContext());
router.attach(ROOT_URI, RootServerResource.class);
return router;
}
}
How can I route not just root "/
" into the RootServerResource
but also all "/*
" path? Is this a limitation of restlet or this can be done?
Try:
router.attachDefault(RootServerResource.class);