Questions tagged [playframework]

Play Framework is a modern open-source web framework for Java and Scala.

Play Framework is a modern open-source web framework for Java and Scala. Play provides a clean alternative to legacy Java stacks. Play is based on a lightweight, stateless, web-friendly architecture. Play has two versions: Play 1.x and Play 2.x.

Other related tags

Play Resources

Play 1.x Resources

Play 2.x Resources

17050 questions
318
votes
7 answers

Understanding implicit in Scala

I was making my way through the Scala playframework tutorial and I came across this snippet of code which had me puzzled: def newTask = Action { implicit request => taskForm.bindFromRequest.fold( errors =>…
Clive
  • 3,701
  • 3
  • 15
  • 14
210
votes
23 answers

How do I change the default port (9000) that Play uses when I execute the "run" command?

How can I change the default port used by the play framework in development mode when issueing the "run" command on the play console. This is for playframework 2.0 beta. Using the http.port configuration parameter either on the command line or in…
Boris Terzic
  • 10,482
  • 8
  • 42
  • 58
121
votes
17 answers

Error: Argument is not a function, got undefined

Using AngularJS with Scala Play, I'm getting this error. Error: Argument 'MainCtrl' is not a function, got undefined I'm trying to create a table consisting of the days of the week. Please take a look at my code. I had checked the name of the…
Kevin Meredith
  • 38,251
  • 58
  • 190
  • 340
117
votes
6 answers

RESTful on Play! framework

We are planning a project primarily serving content to mobile apps, but need to have a website. My question is whether is makes sense to use Jersey or Restlet to develop REST APIs for our mobile apps, and then use Play! to serve the website. Or…
Gary
  • 1,179
  • 2
  • 8
  • 4
91
votes
10 answers

Steps needed to use MySQL database with Play framework 2.0

I'm new to Play framework. I'm trying to configure MySQL database as a datasource to be used with Play Ebeans. Could you some one please explain the steps that are needed to configure MySQL with Play 2.0 framework (like, downloading drivers, adding…
Veera
  • 29,772
  • 35
  • 94
  • 133
90
votes
1 answer

Advice deploying war files vs executable jar with embedded container

There seems to be a current trend in java space to move away from deploying java web applications to a java servlet container (or application server) in the form of a war file (or ear file) and instead package the application as an executable jar…
Brice Roncace
  • 8,771
  • 7
  • 54
  • 64
75
votes
14 answers

Play! framework uses a of statics

Waaah, the Play! framework has so many static methods. Where I go to school, we were told never ever to use any statics, yet Play! uses it like there's no tomorrow. Is that somehow okay? If so, why? We (7 people and I) are planning to use the Play!…
Saew
  • 1,056
  • 1
  • 8
  • 11
74
votes
1 answer

Optimizing JS from WebJars using sbt-rjs in a Play 2.3.x app

Is it possible to have a Play 2.3 app concat/optimize JS (using sbt-rjs) that's included in my app via WebJars? To give a concrete example: I'm trying to create a core.js module which contains all my 3rd party libraries concatenated and minified in…
Dylan Hughes
  • 741
  • 4
  • 3
73
votes
6 answers

How to handle optional query parameters in Play framework

Lets say I have an already functioning Play 2.0 framework based application in Scala that serves a URL such as: http://localhost:9000/birthdays which responds with a listing of all known birthdays I now want to enhance this by adding the ability to…
magicduncan
  • 1,376
  • 1
  • 10
  • 11
73
votes
3 answers

Creating a composite Unique constraints on multiple columns

This is my model: class User {...} class Book { User author; int number; } Every book number starts at 1 per author and increments upwards. So we'll have Books 1,2,3 by John Grisham, Book 1..5 by George Martin, etc... Is there a unique…
ripper234
  • 202,011
  • 255
  • 600
  • 878
69
votes
1 answer

What are the problems with an ADT encoding that associates types with data constructors? (Such as Scala.)

In Scala, algebraic data types are encoded as sealed one-level type hierarchies. Example: -- Haskell data Positioning a = Append | AppendIf (a -> Bool) | Explicit ([a] -> [a]) // Scala sealed trait…
missingfaktor
  • 86,952
  • 56
  • 271
  • 360
67
votes
9 answers

SBT compilation for play framework 2.x disabled by default

I created a new Play Framework project using the activator, activator new my-project-name and then I selected the play-java template and the project is created with no errors. Then I import the project into my IDE, IntelliJ, as a SBT project. When…
dazito
  • 6,832
  • 11
  • 63
  • 107
67
votes
2 answers

How to find out which Play version I'm using?

Kinda silly question, but I used Activator to get started with the play framework, and now need to see what version I'm using. 2.3 came out with support for docker, but when I put dockerExposedPorts in Docker := Seq(9000, 9443) in my build.sbt, it…
joslinm
  • 7,212
  • 6
  • 46
  • 66
66
votes
5 answers

Experiences on free and low-cost hosting for play framework applications?

I'd like to know your experience finding a host for play applications on free or low-cost servers So far now I found the following options: Playapps (discontinued) A cloud hosting solution by zenexity, the company behind play framework module:…
opensas
  • 52,870
  • 69
  • 227
  • 340
63
votes
9 answers

any experience with "Play" java web development framework?

I've just stumbled upon the following new java web framework: Play http://www.playframework.org/ http://www.playframework.org/documentation/1.0/home with such a stunning list of features, I'm pretty much surprised I haven't heard of it…
opensas
  • 52,870
  • 69
  • 227
  • 340
1
2 3
99 100