Questions tagged [playframework]

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

playframework
5,007 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
200 views

Play framework- design suggestion for validation

I need to validate if a certain newly added entity, part of my model has already been added. The addition would happen by taking input from a user. I believe the standard way to do it is to add ...
0fnt's user avatar
  • 8,471
1 vote
0 answers
561 views

Play 2.3 play.api.Configuration$$anon$1: Configuration error[]

When doing sbt run everything works fine. But if I do sbt start I get this very much useless error: play.api.Configuration$$anon$1: Configuration error[] at play.api.Configuration$.play$api$...
Machisuji's user avatar
  • 738
1 vote
0 answers
126 views

Play! 2 Framework doesn't recognize Apache port forwarding

I've just finished developing my first Play! 2 application and have to deploy it to my school server. The application runs on port :9002 and we use port forwarding in order to have a nicer URL (e.g. "...
Alex Ardelean's user avatar
1 vote
0 answers
379 views

Display warnings in sbt continuous compilation mode

I am running "activator ~run" on my scala project to have it update immediately after I make a change to the code. This works nicely, but I dont see any warnings any more on subsequent compiles. The ...
nemoo's user avatar
  • 3,299
1 vote
0 answers
75 views

Ebean model based on a OneToOne field

If I have a model which contains a OneToOne relationship: class Person { int id; String name; int age; Detail detail; } class Detail { int id; String description } If I have the id of ...
Budi Sutrisno's user avatar
1 vote
0 answers
204 views

How to get Constraints annotation in Play! framework scala template helper?

I 'd like to write a helper that generates code for easyui in Play! 2.2.3. In my model, I have a field,eg @Entity public class User extends Model{ ... @Required @Email public String email; ... } ...
soleverlee's user avatar
1 vote
0 answers
882 views

How to send a message from other java controllers to an Akka actor in play?

I've implemented a basic web socket example with Akka actor, this is the code i used in the Play framework application controller: public static WebSocket<String> socket() { return ...
Ilproff_77's user avatar
1 vote
0 answers
259 views

Can we get value from action methods in play framework?

Here I have a action method, def foo = SecuredAction { implicit request=> val someImpData:String = request.someData Ok(someImpData) } is there any way to run this method and get ...
mane's user avatar
  • 1,159
1 vote
1 answer
221 views

How does a higher version of a library in build.sbt affect Play (that uses lower version)?

So here's a part of my build definition: libraryDependencies in Global ++= Seq( ... "com.fasterxml.jackson.core" % "jackson-core" % "2.4.0", "com.fasterxml.jackson.core" % "jackson-...
supertonsky's user avatar
  • 2,613
1 vote
0 answers
133 views

Deploying to heroku play framework java

I get this error when deploying my play 2.3 java project. This is my first time deploying [info] Set current project to scala_buildpack_build_dir (in build file:/tmp/scala_buildpack_build_dir/) [...
user2595818's user avatar
1 vote
0 answers
248 views

Form submiting with Play/Scala and MongoDB

I am currently writing my first application with scala (2.11), Playframework (2.2.3) and MongoDB (with Salat). Since I dont really know any of them too well I've got a bit of a beginner problem: I can'...
Markus's user avatar
  • 1,563
1 vote
1 answer
68 views

How to include war in play 2 app?

I have a play 2 Scala application and my customer wants to add a blog solution in a subfolder of this application. I came accross this java blog solution called Apache Roller. The issue is that I am ...
Cristian Boariu's user avatar
1 vote
0 answers
696 views

Array query in Scala and ReactiveMongo?

I have a MongoDB collection whose documents look like this: { "name" : "fabio", "items" : [ { "id" : "1", "word" : "xxxx" }, { "id" ...
ticofab's user avatar
  • 7,655
1 vote
0 answers
75 views

Play framework artefacts only found on second attempt

I'm setting up a build system for a play project on Atlassian bamboo which runs on AWS. When I do a command such as "play dist" it fails to download core play artefacts: [error] download failed: com....
mangecoeur's user avatar
1 vote
1 answer
592 views

Play Framwork Java Angular - redirect to html page

I have a ToDoController.java and the method public static Result getAllToDos() { return ok(index.render("Your new application is also ready.")); } How can i redirect the page to ToDo.html ...
Abhi's user avatar
  • 6,510
1 vote
0 answers
299 views

Why does activator report invalid sha1 in Play 2.3.2 project?

I am using Play Framework 2.3.2. Upon running ./activator it ends with the following FAILED messages: [info] downloading httpx://repo1.maven.org/maven2/org/codehaus/plexus/plexus-component-api/1.0-...
RayYen's user avatar
  • 13
1 vote
1 answer
896 views

SBT can't resolve Play source jars (play

The setup I've recently set up an Artifactory to protect our project from jar infection and my Play scala project is now having some issues resolving dependencies. My ~/.sbt/repositories file: [...
Michael Allen's user avatar
1 vote
2 answers
1k views

play.data.Form - How best to fill default form values

Trying to add a filter form to a standard crud 'list' page. // set filter defaults ImageFilter defaultFilter = new ImageFilter(); defaultFilter.setYear(currentYear); defaultFilter.setColor(user....
davur's user avatar
  • 1,418
1 vote
0 answers
522 views

Parse deeply nested JSON as Scala Option[Object]

I have read several JSON parsing techniques, but I cannot exactly understand how to get the functionality I want. I am trying to parse a deeply nested JSON, returned from the Facebook Graph API (user ...
kiambogo's user avatar
1 vote
0 answers
196 views

Can we use Groovy Template Engine in Grails Framework(GGTS)?

I am planning to convert a project from play1.2.5( Java Based) to Grails framework and in the html files we have used Groovy template engine to generate html components. Can we use Groovy Template ...
sukanta das's user avatar
1 vote
1 answer
416 views

HTTP headers for public Assets in play framework

How to set headers for public Assets in play framework? Assets are like javascript, css and images files. How to set X-Content-Type-Options, X-XSS-Protection,and X-Frame-Options headers to these files?...
Bhagyashree's user avatar
1 vote
0 answers
149 views

Play: Exclude certain tables from being managed by the evolutions?

I have a Scala Play app over a MySQL instance. I store my evolutions as conf/evolutions/$db/$step.sql files. However, some of my tables are dynamic i.e. their schema may be modified during the runtime ...
pathikrit's user avatar
  • 33.2k
1 vote
1 answer
539 views

Unit test in Play Framework 2 (Java) not rolling back changes between tests

I have a unit test where I would like to test that a certain runtime exception occurs. However, it seems that the database changes are not rolled back between each test in the test class, which is the ...
plade's user avatar
  • 541
1 vote
0 answers
99 views

calculate the body length

def logTime(result: PlainResult): Result = { result.header.headers.get(HeaderNames.CONTENT_TYPE) match { case Some(ct) if ct.trim.startsWith(MimeTypes.JSON) => result match { case ...
user3231931's user avatar
1 vote
1 answer
161 views

How to enable HTTPS together with debug in play framework 2.2.x

I'm using the play framework in version 2.2.3. I can configure play to use HTTPS and specify the port like described in the documentation. If I use the ./nameOfMyApp -Dhttps.port=9443 it works just ...
Kris's user avatar
  • 4,683
1 vote
0 answers
196 views

Scala, Play framework. REST request to Google Custom Search Engine

I'm new to Scala and Play Framework, and trying to learn them by doing small tasks. Now i'm stuck on how to make GET request to CSE of Google. Usual GET-request i can do like this : val ...
partTimeNinja's user avatar
1 vote
0 answers
230 views

Running multi-module Play tests from SBT

I'm quite stuck at the moment with my multi-module Play project. I have 2 Play projects and 3 libraries. As the projects are interdependent (APIs are strongly linked) I'd like to manage all the ...
Sofian Djamaa's user avatar
1 vote
0 answers
1k views

Play Framework 2.2.3 : Define a default date format for data binding

I have searched for a while but I didn't find anything in the play documentation : I have a class customer that contains a date : private Date birthday; My controller creates the object by binding ...
anthofo's user avatar
  • 93
1 vote
0 answers
118 views

How do I provide the proper type information to get my generic filter function working for slick

I'm trying to implement some generic filters in a base class for my slick tables. What I'm trying to accomplish is the ability to translate url query strings into database filters. I've come up with ...
mgeiger's user avatar
  • 77
1 vote
2 answers
540 views

How to init case class from one JSON string instead of separate fields of form

New to the Play framework. After reading the doc, I know the standard way to initialize case class by using form like this: import play.api.data._ import play.api.data.format.Formats._ val userForm ...
DiveInto's user avatar
  • 2,228
1 vote
2 answers
1k views

To deploy Play Framework apps in AWS (Amazon) ec2 using Ansible playbook

I am very new to AWS ec2 platform. I wanted to deploy my play 2.* app in the ec2. Also I need to deploy it through git in future update. I have done a decent research on it and found Ansible playbook ...
Sagiruddin Mondal's user avatar
1 vote
0 answers
386 views

No test run when running "play jacoco:test" whereas "play test" works fine

I'm trying to run jacoco against my junit tests in play framework environment. I can run them using: play jacoco:test but the result is: [info] Loading project definition from /home/git/release-...
user3611522's user avatar
1 vote
0 answers
104 views

Issue updating Heroku JDK to 1.7 with Play 2.2.3

I am trying to update Heroku to run with JDK 1.7, from a Windows development environment. In following with the docs here I created a system.properties file in my app's root directory, containing the ...
Jack Hopkins's user avatar
1 vote
0 answers
1k views

error: cannot find symbol, symbol class With - Play framework java

I am trying to use play framework's Composing actions using Java. I am getting a compilation error. error: Cannot find symbol @With(Menus.class) ^ Can any one tell me what is the error?
Siddhu's user avatar
  • 389
1 vote
0 answers
196 views

Play framework with Google App Engine, will this destroy scalability?

Could I get some advice on what is the better way? My questions regard Play framework, Google App Engine and web development. So I am about to start writing a website which (the hope is) will be ...
Saad Attieh's user avatar
  • 1,446
1 vote
0 answers
354 views

Play Framework WebSocket disconnecting IE clients

I've asked on the Play Framework forums, but figured I'd ask here as well for the additional coverage: Using Play Framework 2.3, I have a WebSocket handled with an actor that I'm using to push "...
ffxtian's user avatar
  • 559
1 vote
0 answers
59 views

Result method called 3 times upon page call

I use simple method to view page, but upon using it I see that ok() method is called 3 times no matter what. @Security.Authenticated(Secure.class) public static Result index() throws SQLException { ...
Slx.x's user avatar
  • 57
1 vote
0 answers
678 views

Play framework model relationship

I'm studding play framework trying make a api using play java, I did insert, delete, update. When I was making login system with sessions, I face a doubt about relationship between two models. I ...
sidneivl's user avatar
  • 244
1 vote
0 answers
264 views

SecureSocial doesn't save the user session, and therefore cannot get past the login screen

I'm running Play 2.2.3 with SecureSocial, and it redirects to /account once the user has logged in. However, the session cookie doesn't get saved and I get redirected back to the login screen, despite ...
Jack Hopkins's user avatar
1 vote
0 answers
104 views

Updating an ArrayList not permanent

Good day! I'm having a problem when updating an entity. When I click the "update" button, the changes are saved. However, when I go a different page, the recently changed (or added) items are there ...
user3698432's user avatar
1 vote
1 answer
1k views

error: cannot find symbol login.render(form(Login.class))

i was trying to do this tutorial here: http://www.playframework.com/documentation/2.1.0/JavaGuide4 but after adding this method to my "Application.java" class, i have the problem, that the variable "...
MinionDeveloper's user avatar
1 vote
0 answers
173 views

How do I get the template editor for Eclipse scala SKD?

I am trying to get started developing with the Eclipse Scala SDK with the Play Framework. But when I try to select an editor with which to open my views (*.scala.html), there is no option that I can ...
John K's user avatar
  • 167
1 vote
0 answers
227 views

Play Framework : Lining up a FakeRequest with an temporary file action wrapped in maxLength

Trying to test a play controller, but caught in their super clever meta-programming tar-pit. How do I line up a FakeRequest with a temporary file parsing action wrapped with a maxLength? : trait ...
Hassan Syed's user avatar
  • 20.3k
1 vote
1 answer
386 views

Incrementing a column without using plain sql

I am currently incrementing a column (not a auto-increment PK column) in my database using the following: def incrementLikeCount(thingId: Int)(implicit session: Session) = { sqlu"update things set ...
Blankman's user avatar
  • 264k
1 vote
1 answer
602 views

Play template compilation error on initial load

Since we've been using Play, one issue has continued to plague us. We have a page consisting of JQuery Ajax calls to a small number of additional Play endpoints. When Play is first started (...
Ewen's user avatar
  • 31
1 vote
0 answers
1k views

input date and time in play framework

i am trying to input date and time in play framework. in my model i have this import java.util.*; @Required public Date date; and then in my views i am using bootstrap-datetimepicker <div class=...
mshukla's user avatar
  • 807
1 vote
0 answers
357 views

Integrate Wowza Module and Play Framework For Restful API Development

I am going to write a restful api with wowza Currently i am using Wowza default HTTP Provider Class for that but Wowza HTTP Provider is not that much scalable. I need to know can i somehow integrate ...
Usama's user avatar
  • 465
1 vote
0 answers
1k views

Overloaded method value [apply] cannot be applied to (play.api.data.Mapping[String])

I am studying to use play and scala to build a web app, and have some problem with checkbox post. My controller: val serviceForm = Form(tuple( "id" -> number, "name" -> text, "...
Sato's user avatar
  • 8,332
1 vote
1 answer
516 views

How to generate hierarchy/UML diagram with Play 2.2.x?

I know you can use scaladoc itself to generate hierarchy diagrams but how do I use play doc to do that?
pathikrit's user avatar
  • 33.2k
1 vote
1 answer
55 views

Is there any page which provides Syntax and explanations for Helper Form of play framework?

I actually looking forward to learn Syntax to develop pages using HelperForm in playFrame Work for Creating Forms. I don't get Syntax any where to create a dropdown box which gets values from a table ...
user3650034's user avatar

1
38 39
40
41 42
101