0

I have spent 3 days 48 hours trying to show simple login form. It is me being stupid or play being complicated.

Anyway I am getting error:

[error] login.scala.html:16: Expected ')' but found 'EOF'
[error] }
[error]  ^
[error] (compile:twirlCompileTemplates) Twirl compilation failed

This error really do not tell nothing. There is no editor which highlight scala twirl syntax and errors and I do not know how to fix it.

@(form: Form[User] )
@import helper.twitterBootsrap._

@main(title=Messages("login.title"){

        @helper.form(routes.ApplicationController.verifyLogin()) {
              <h3>Messages("login.title")</h3>
              @helper.inputText(form("login"))
              @helper.inputText(form("password"),"name->@Messages("login.password")")

            <p>
                <input type="submit">@Messages("login.submit")</input>
            </p>
        }
}
Vladimir
  • 23
  • 3

1 Answers1

1

You are missing a parenthesis:

@main(title=Messages("login.title")) {

The error was pretty explicit, it was expecting a ) and none was found. IntelliJ has syntax highlight for twirl, maybe it can help you. I pasted your code there there, clicked on a parenthesis and it was immediately highlighted as red because it was not closed.

nmat
  • 6,992
  • 6
  • 26
  • 41