Calculation in Play 2.0 Framework template engine

java, playframework, playframework-2.0, scala

Solution

Have you tried `@(a.toInt + b.toInt)`?

Problem

Does play 2.0 template engine support the simple calculation in the html page. Let us say, I create a sum.scala.html page: ``` @(a:String, b: String) <html> <head></head> <body> <h1> answer is getSum(@a,@b) </h1> </body> </html> ``` Is there any way that we could "getSum of a and b" via some function? or Does any play 2.0 expert know any good idea about calculation in play 2.0 template engine? Thanks

Original source