changeset 197 | 9c968d0de9a0 |
parent 161 | a0aebea668f9 |
196:22f027da67ec | 197:9c968d0de9a0 |
---|---|
1 package controllers |
|
2 |
|
3 import play.api._ |
|
4 import play.api.mvc._ |
|
5 |
|
6 // hello world program: |
|
7 // just answer the GET request with a string |
|
8 |
|
9 object Application extends Controller { |
|
10 |
|
11 // answering a GET request |
|
12 def index = Action { |
|
13 Ok(views.html.index("222Your new application is ready.")) |
|
14 //Ok("Hello World") |
|
15 } |
|
16 |
|
17 } |
|
18 |
|
19 /* |
|
20 * HTML can be returned using |
|
21 * |
|
22 * Ok("<H1>Hello world!</H1>").as(HTML) |
|
23 * |
|
24 */ |