diff -r 22f027da67ec -r 9c968d0de9a0 progs/Application1.scala --- a/progs/Application1.scala Sat Oct 04 00:36:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -package controllers - -import play.api._ -import play.api.mvc._ -import play.api.data._ -import play.api.data.Forms._ - -/* - * Answers a GET-request by sending a simple login form. - * - * Processes the POST-data by just printing the results. - * - */ - -object Application extends Controller { - - // GET request -> login form - val index = Action { request => - - val form = """ -
""" - - Ok(form).as(HTML) - } - - - // POST data: processing the login data - val receive = Action { request => - - val form_data = Form(tuple ("login" -> text, "password" -> text)) - val (login, password) = form_data.bindFromRequest()(request).get - - Ok(s"Received login: $login and password: $password") - } - -}