progs/Application0.scala
changeset 103 bd6e45c7aa8d
child 105 40c51038c9e4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/progs/Application0.scala	Tue Sep 24 12:23:54 2013 +0100
@@ -0,0 +1,23 @@
+package controllers
+
+import play.api.mvc._
+
+// hello world program: 
+// just answer the GET request with a string
+
+object Application extends Controller {
+
+  // answering a GET request
+  val index = Action { request =>
+
+    Ok("Hello world!")
+  }  
+  
+}
+
+/*
+ * HTML can be returned using
+ *
+ * Ok("<H1>Hello world!</H1>").as(HTML)
+ *
+ */