Java Reference
In-Depth Information
Figure 8-21. Routes file compilation error
Play cannot compile your routes file because it references actions that don't exist. The next step is
to add these actions to the Application.java file.
Creating the Controller and Actions
In this section, you will create the actions, as illustrated in Listing 8-8.
Listing 8-8. Application Controller in the Books Application
1. public class Application extends Controller {
2.
3. public static Result index() {
4. return ok(index.render("Your new application is ready."));
5. }
6.
7. public static Result books() {
8. return TODO;
9. }
10.
 
Search WWH ::




Custom Search