app1.scala
changeset 6 4c40d4b2d01c
parent 5 1280309e6bfc
--- a/app1.scala	Mon Sep 24 20:51:17 2012 +0100
+++ b/app1.scala	Tue Sep 25 01:32:01 2012 +0100
@@ -1,18 +1,18 @@
 object Application extends Controller {
 
-  // presenting login form
+  // GET request -> present login form
   val index = Action { request =>
     
-    val form = """<form method="post"> 
-                Login: <input type="text" name="login"><br>
-                Password: <input type="password" name="password"><br>
-                <input type="submit"></form>"""
+    val form = 
+       """<form method="post"> 
+          Login: <input type="text" name="login"><br>
+          Password: <input type="password" name="password"><br>
+          <input type="submit"></form>"""
 
     Ok(form).as(HTML)
   }  
 
-  
-  // processing the received login data
+  // POST data: processing the login data
   val receive = Action { request =>
     
     val form_data = Form (tuple ("login" -> text, "password" -> text))
@@ -21,7 +21,6 @@
     
     Ok("Received login: " + login + " and password: " + password)
   }
-  
 }