changeset 13 | 2bd3530c30af |
12:621301c1cb63 | 13:2bd3530c30af |
---|---|
1 package controllers |
|
2 |
|
3 import play.api.mvc._ |
|
4 |
|
5 // hello world program |
|
6 // just answers the GET request with a string |
|
7 |
|
8 object Application extends Controller { |
|
9 |
|
10 // answering a GET request |
|
11 val index = Action { request => |
|
12 |
|
13 Ok("Hello world!") |
|
14 } |
|
15 |
|
16 } |
|
17 |
|
18 /* |
|
19 * HTML can be returned using |
|
20 * |
|
21 * OK("<H1>Hello world!</H1>").as(HTML) |
|
22 * |
|
23 */ |