I am using the Java Play Framework and trying to pass array values from controller to view, but I got error. My code is here:
public class Application extends Controller {
public static Result index() {
String s= "Hello Mr.View";
String st[] = {"firstValue","second","third","fourth"};
return ok(index.render(st));
}
}
and my template is:
@(message: String)
@import helper._
@import models._
@import java.sql._
<h1>@message </hl>
How can I resolve this error?