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
45
votes
3 answers

Play 2.4: Form: could not find implicit value for parameter messages: play.api.i18n.Messages

I am new to Play framework and tried to mimic the helloworld sample in my local machine but I encountered an error: routes: # Home page GET / controllers.Application.index # Hello action GET /hello …
arjayads
  • 501
  • 1
  • 5
  • 14
45
votes
4 answers

how to remove key value from map in scala

Map(data -> "sumi", rel -> 2, privacy -> 0, status -> 1,name->"govind singh") how to remove data from this map , if privacy is 0. Map(rel -> 2, privacy -> 0, status -> 1,name->"govind singh")
Govind Singh
  • 14,083
  • 12
  • 58
  • 94
44
votes
1 answer

How to declare a variable named 'type' in Play/Scala?

I want to declare a variable with name 'type' in a Play/Scala application, since my data has this field name and I'm using JSON transforms. It just makes more sense. Fortunately I could just rename the field, but still curious if there is a way to…
jmend
  • 1,130
  • 3
  • 15
  • 30
43
votes
3 answers

Discovery of Akka actors in cluster

I’ve been trying to wrap my head around the concepts of Akka and actor-based systems recently. While I have a pretty good understanding of the Akka fundamentals by now I’m still struggling with a few things when it comes to clustering and remote…
Lunikon
  • 3,301
  • 4
  • 21
  • 20
42
votes
4 answers

GSON JsonObject "Unsupported Operation Exception: null" getAsString

Running a Play! app with Scala. I'm doing a request where the response is expected to be a JSON string. When checking the debugger, the JsonElement returns OK with all information as expected. However, the problem is when I try to actually run…
crockpotveggies
  • 11,654
  • 11
  • 65
  • 127
40
votes
3 answers

Play Framework - add a field to JSON object

I have a problem with adding a field to Json object in Play Framework using Scala: I have a case class containing data. For example: case class ClassA(a:Int,b:Int) and I am able to create a Json object using Json Writes: val classAObject =…
Paweł Kozikowski
  • 974
  • 1
  • 10
  • 21
40
votes
7 answers

Does Playframework 2.0.x support in templates

I wonder if play 2.0.3 and higher supports else if in views? I only read that one have to code that way: if {...}else{if{...}else{...}} cannot believe that.
Sven Malvik
  • 725
  • 2
  • 8
  • 16
40
votes
2 answers

Choosing a Scala web framework

I am about to start a project for a web application that should run on a Tomcat server. I have decided to go for Scala - the other alternative where I work being Groovy - essentially for type safety. I am now faced with the task of choosing the…
Andrea
  • 19,377
  • 21
  • 107
  • 177
40
votes
7 answers

Securing REST API on Play framework and OAuth2

I am developing an application with Play 2.0 and Scala that exposes some REST API. These APIs will be used by different applications, web, mobile or desktop, so the OAuth protocol (OAuth2) seems the most suitable. Also I would initially use an…
Marco
  • 1,565
  • 3
  • 14
  • 28
39
votes
7 answers

Debug Playframework in Eclipse

I just moved from Netbeans to Eclipse. In Netbeans, I can debug Playframework applications out of the box. However, in Eclipse, it seems hard to configure this in order to debug a web app (a Playframework app in specific). As in Play! documentation,…
Thang Nguyen
  • 1,163
  • 4
  • 16
  • 28
39
votes
5 answers

Spray, Akka-http and Play, Which is the best bet for a new HTTP/REST project

I'm going to develop new HTTP/REST services using Scala and Akka Actors. I have experience working with Play, but I don't really need a complete web Framework. From what I read, I think Spray is a suitable choice. My question come from the future…
Fede
  • 701
  • 1
  • 7
  • 16
37
votes
2 answers

What is a Boxed Error in Scala?

When I run my application, the browser shows [ExecutionException: Boxed Error] It doesn't say anything about the line number, etc. In the console, I have the following ! @6elaah0c8 - Internal server error, for (GET) [/testlearn]…
yzernik
  • 1,050
  • 2
  • 12
  • 18
37
votes
1 answer

ProcessBuilder gives a "No such file or directory" on Mac while Runtime().exec() works fine

I have an application, running on the Playframework, which needs to encode some video files. I used Process pr = Runtime.getRuntime().exec(execCode) for this (and it works perfectly), but as I need both, the output stream and the error stream, I…
Luuk D. Jansen
  • 4,120
  • 7
  • 41
  • 86
36
votes
1 answer

Play Framework @routes.Assets.at Compilation Error

I'm using Play 2.4.0 and I've been trying to follow the tutorial from the main page: https://playframework.com/ which is for Play 2.3 and after solving a couple of issues regarding changes in the Ebean ORM from version 2.3 to 2.4, I'm stuck with the…
Daniel Romero
  • 1,542
  • 1
  • 19
  • 32
35
votes
2 answers

What is Play framework web server

Do anyone know which web server is used by play! framework? I'm planning to prototype a small intranet app using Play! and I am wondering whether I should use the default play web server or Apache or IIS as used internally. I don't predict several…
emt14
  • 4,676
  • 7
  • 33
  • 57