Learn Java for Web Development

(Tina Meador) #1

368 CHAPTER 8: Play with Java and Scala


All the files necessary to configure an Eclipse project are generated. You saw how to create a project and
import it into your development environment. Now you will modify the application. In Application.java,
change the content of the response in the index action, as illustrated in Listing 8-3.


Listing 8-3. Modifying the Index Action


public static Result index() {
return ok("Hello world");
}


The index action will now respond with “Hello world,” as illustrated in Figure 8-15.


Figure 8-14. Selecting the root directory

Free download pdf