user3583667
user3583667

Reputation: 51

Is it possible to get rid of Scala when using Play Framework?

Good day! I am using Play Framework in doing a Java application. Even though I am using Java, I noticed that Scala is still needed in the HTML files (like how PHP works when you have to do some if statements and looping). I am wondering if it is possible to get rid of using Scala (just pure Java and HTML) even though I use conditionals and loops in the HTML files. If I can't, are there better alternatives? Thank you!

Upvotes: 2

Views: 226

Answers (3)

Andreas Neumann
Andreas Neumann

Reputation: 10894

As Play2 was redesigned and rewritten in Scala it is not possible to get rid of that dependency. The older versions of Play, prior to Version 2.X, that have been written in pure Java could do that but I wouldn't use them anymore as they are no longer activly maintained.

Upvotes: 0

James
James

Reputation: 1446

You can use Groovy template like in Play 1.

https://github.com/manuelbernhardt/play2-groovy-templates

Upvotes: 0

Will Sargent
Will Sargent

Reputation: 4396

You can use something other than Twirl: for example, you can use Freemarker as the template engine:

https://github.com/guillaumebort/play2-freemarker-demo

Upvotes: 3

Related Questions