progs/Application0.scala
changeset 161 a0aebea668f9
parent 105 40c51038c9e4
equal deleted inserted replaced
160:4cbd6ca025e6 161:a0aebea668f9
     1 package controllers
     1 package controllers
     2 
     2 
       
     3 import play.api._
     3 import play.api.mvc._
     4 import play.api.mvc._
     4 
     5 
     5 // hello world program: 
     6 // hello world program: 
     6 // just answer the GET request with a string
     7 // just answer the GET request with a string
     7 
     8 
     8 object Application extends Controller {
     9 object Application extends Controller {
     9 
    10 
    10   // answering a GET request
    11   // answering a GET request
    11   val index = Action { request =>
    12   def index = Action {
    12 
    13     Ok(views.html.index("222Your new application is ready."))
    13     Ok("<H1>Hello world!</H1>").as(HTML)
    14     //Ok("Hello World")
    14   }  
    15   }  
    15   
    16   
    16 }
    17 }
    17 
    18 
    18 /*
    19 /*