private Dest resolveDefault(WebApp.HTTP method, String path) { List<String> parts = WebApp.parseRoute(path); String controller = parts.get(WebApp.R_CONTROLLER); String action = parts.get(WebApp.R_ACTION); // NameController is encouraged default Class<? extends Controller> cls = find(Controller.class, join(controller, "Controller")); if (cls == null) { cls = find(Controller.class, controller); } if (cls == null) { throw new WebAppException(join(path, ": controller for ", controller, " not found")); } return add(method, defaultPrefix(controller, action), cls, action, null); }
private Dest resolveDefault(WebApp.HTTP method, String path) { List<String> parts = WebApp.parseRoute(path); String controller = parts.get(WebApp.R_CONTROLLER); String action = parts.get(WebApp.R_ACTION); // NameController is encouraged default Class<? extends Controller> cls = find(Controller.class, join(controller, "Controller")); if (cls == null) { cls = find(Controller.class, controller); } if (cls == null) { throw new WebAppException(join(path, ": controller for ", controller, " not found")); } return add(method, defaultPrefix(controller, action), cls, action, null); }
private Dest resolveDefault(WebApp.HTTP method, String path) { List<String> parts = WebApp.parseRoute(path); String controller = parts.get(WebApp.R_CONTROLLER); String action = parts.get(WebApp.R_ACTION); // NameController is encouraged default Class<? extends Controller> cls = find(Controller.class, join(controller, "Controller")); if (cls == null) { cls = find(Controller.class, controller); } if (cls == null) { throw new WebAppException(join(path, ": controller for ", controller, " not found")); } return add(method, defaultPrefix(controller, action), cls, action, null); }