What you need is not a RESTful set of routes from the point of AvctiveWeb framework: http://javalite.io/routing#restful-routing.
What you are trying to do is to define some custom routes. Not to say that they are not REST - based though.
Here is the example that works:
The route:
public class RouteConfig extends AbstractRouteConfig{
public void init(AppContext appContext) {
route("/posts/{post_id}/comments/{comment_id}").to(CommentsController.class).action("index").get();
}
}
The controller:
public class CommentsController extends AppController {
public void index(){
respond("index, post:" + param("post_id") + ", comment: " + param("comment_id"));
}
}
then hit this:
http://localhost:8080/posts/123/comments/456
and observe:
index, post:123, comment: 456