See my answers below.
> Yes, it is doable. Just change the return code in EmployeeController->add() to
return renderView("/department/add");
renderView method loads jsp files from views/department directory without going through DepartmentController.
If you need code logic in DepartmentController's add() method, you can use redirect like the following:
return redirectTo("/department/add");
> Either you rename your controller class to "EmployeeoftheyearController" or add controller_class property in your route like the following:
routes.name.eoy=\
url:/eoy; \
controller:employeeoftheyear; \
controller_class:greeting.controllers.EmployeeOfTheYearController; \
action:index
The controller class is:
package greeting.controllers.EmployeeOfTheYearController;
import static com.scooterframework.web.controller.ActionControl.*;
public class EmployeeOfTheYearController {
public String index() {
return "This is EmployeeOfTheYearController";
}
}
Many Thanks!