Attic/programs/Application0.scala
changeset 198 2ce98ee39990
parent 13 2bd3530c30af
equal deleted inserted replaced
197:9c968d0de9a0 198:2ce98ee39990
       
     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  */