author | Christian Urban <urbanc@in.tum.de> |
Fri, 28 Sep 2012 15:18:44 +0100 | |
changeset 13 | 2bd3530c30af |
permissions | -rw-r--r-- |
13 | 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 |
*/ |