Actions process HTTP requests and return HTTP responses. So far, you have seen how HTTP requests were routed by the framework to call your application's code. Now, let's see how you can reply with HTTP responses.
An HTTP response has a status code and some optional headers and can be followed by a body. So, to build a response, you have to at least supply a status code.
For instance, your current action definitions return HTTP responses with status code 501 (Not Implemented). Try changing it to
ok() in Java) and reload the page in your browser (or perform a request with cURL), you should get a response with status code 200
(OK). Play provides helpers to build responses with common status codes. Examples of other predefined ...