Questions tagged [playframework-2.0]

Play Framework 2.0 is a major revision of Play, a Ruby on Rails-like framework for the Java platform. Version 2.0 introduces features such as the use of Scala language, Akka actors, Scala templates and a build system (SBT).

1
vote
1answer
38 views

play framework application routes broken

am working on a play framework application: I have some routesuser registration and loginGET /register controllers.HomeController.registration()while trying to reachhttp:...
0
votes
1answer
29 views

Play Framework can't handle more than 12 concurrent connections

I have a vanilla Play 2.6 app that can't handle more than 12 concurrent connections. It also affects Play 2.5.This is an example controller:public class TestController extends Controller {...
0
votes
1answer
15 views

play framework cannot find symbol symbol: method form(java.lang.Class<models.SignUp>)

I am rendering a SignUp form. Below is my code of Register.java and SignUp.java controllers/Register.java :package controllers;import models.SignUp;import play.mvc.*;import play.data.Form;...
1
vote
0answers
14 views

Play! framework call delayed DOMContentLoaded

I have a Play! application running for a while and it seems to work fine. But every now and then, some calls to the server get delayed for no apparent reason. I have a simple "ping" endpoint that ...
0
votes
0answers
27 views

playframework 2.6 creating database tables for tests

I am facing an issue with Play 2, basically I am trying to add a couple of functional tests using Play and I am trying to load my current database, I am able to create my table, insert data and so on ...
0
votes
1answer
30 views

Play framework 2.6 Java unable to compile on new Mac

So My old mac died and I bought a new one which I setup using migration utility and a time machine backup.I use IntelliJ and have quite a number of Play 2 projects which no longer compile either in ...
1
vote
1answer
14 views

Ajax Post Call Play 2 Framework 2.6.19 send always None to Controller

I'm trying to update an old Play 2 Framework app to last version 2.6.19One view uses Post Query Ajax to send Forms to controller but now after update the code the data binded in Form is always empty ...
-1
votes
1answer
33 views

How are Futures executed in an Akka actor

I'm trying to make a background task that performs a network call and stores the response in a database. According to the documentation, background tasks are supposed to use the scheduler within the ...
0
votes
3answers
43 views

if statement in scala template play framework

hey guys am trying to send a value for user if he is logged in and in not i execute an if statement in a home page scala template User loggeduser=User.find.query().where().eq("token", session("...
1
vote
1answer
70 views

Scala Serializing a Seq of Objects or Any

I ran into a problem with serializing a model: MyModel: case class DocumentModel(documentId: Option[Int]=None,title: String,...
0
votes
1answer
24 views

Cache solution to manage external api calls using play framework

I have some external paid api that I use to retrieve data based on some id, and some of the calls I will perform will probably have the same id, so im looking for the best practice in play to manage ...
0
votes
0answers
21 views

Trying to get Play, Ebean and H2 to work together results in “Bad play-ebean configuration, check your configuration file”

I'm trying to get H2 and Ebean to work together in PlayFramework, but it always results in Error in custom provider, java.lang.RuntimeException: Bad play-ebean configuration, check your configuration ...
0
votes
2answers
54 views

Slick “for/yield”-query doesn't compile with negative comparison

I ran into an odd problem with my slick-query:As you can see, the function below is compiling although it's basically the same query but with a possitive comparison (I don't know if it's actually ...
1
vote
1answer
22 views

Bypass Form Validation

I have a form with a radio button group for which I have set the validation logic that one of the radio buttons in the group must be selected on submission.However I also have a cancel button on ...
0
votes
2answers
77 views

Redirect in Scala play framework

I have a problem with Redirect in Scala play framework.How can I redirect to view BooksController.index() ? In documentation they suggest to use Redirect but I don't know how. def edit(Id: Int)...
1
vote
1answer
71 views

Playframework [Scala]: Creating forms

I'm beginner to Scala and Playframework. I have some code in Java and I have a problem to translate it into Scala. Can you suggest something how can I do it? I check documentation about ScalaForms but ...
0
votes
1answer
44 views

filter for services with guice injector in MVC architecture

We have several modules, each with few services. We are using play framework and it works well with juice dependency injector.for example, For module x, @implementedBy(XI1Impl.class)interface ...
0
votes
2answers
40 views

Can't start the Play Framework application

I am using 2.5.x play framework and here is my application.confplay.http.secret.key="changeme"play.i18n.langs=[ "en", "en-US", "fr" ]..........When I am trying to run the application using ...
0
votes
0answers
16 views

Testing request cached with Play

In my application i want to cache the http requests so i followed this documentation: https://www.playframework.com/documentation/2.6.x/ScalaCache#Caching-HTTP-responsesBy this way to caching ...
0
votes
1answer
36 views

play 2.6.x environment dependency injection

I am trying to find the mode (Dev vs Prod) of my play application. I have injected Environment as below:public class Sample{@Injectprivate play.Environment environment;and I am invoking ...
0
votes
2answers
48 views

Java EBean Play Framework. findOne() not working ? how to return one object instead of findList()?

//Below code is Not Working//Here, my query just returns one object, So I am trying to use findOne() //method. Query<Topic> query=Ebean.find(Topic.class);Topic topic=new Topic();Topic ...
1
vote
1answer
45 views

how to deploy playframework with mongodb on kubernetes

I want to deploy our project built with nginx, playframework,and mongodb etc. to Kubernetes. However, i couldn't find any tutorials on internet how to do that. Could anyone advise where i can find ...
0
votes
2answers
34 views

Service class and logging design Scala with Futures

I have a service class that gets some data from a database (for context, I'm using Play! Framework). Here's an example method:def getAccessToken(id: BSONObjectID): Future[Option[String]]={...
0
votes
0answers
66 views

cant configure ensime on a play 2.1.0 project

I have a play 2.1.0 project. I'm using atom to edit files, and I want to configure the ensime plugin, but cant run sbt ensimeConfig to create the .ensime fileI followed this guide: http://ensime....
1
vote
0answers
51 views

Fontawesome loading but not displaying properly Play Framework Firefox

To start, I am new to Play framework and Scala, but not Java. I have confirmed that this is not an issue in Google Chrome. first just tried copy-pasting the cdn, then realized I needed to serve the ...
0
votes
0answers
17 views

Play2.5.x Java : Unable to modify the RequestHeader

I have a scenario wherein we are trying to modify the RequestHeader before it reaches the Controller. I tried doing it in Filter, RequestHandler and also by creating an Action, but though I was able ...
0
votes
0answers
16 views

How to perform SQL IN in slick where values for IN are retrieved from a Map?

I have a Map[Rep[Int], List[String]] and I want the VALUES(...) for the IN clause to be retrieved from the Mapval myMap: Map[Rep[Int], List[String]]=Map( (10: Rep[Int]) -> List("one", "two"))...
0
votes
0answers
35 views

Reassigning variable in loop, Scala Play framework

I have a problem with reassigning variables..@myVar={<a href="http://stackoverflow.com.mevn.net/uno">Uno</a>}@for (item <- LOOP ) {@myVar={<a href="http://stackoverflow.com.mevn.net/@item.url">@item.value</a>} //This part is not ...
0
votes
0answers
15 views

Should Play automatically resolve route? [duplicate]

I have two routes POST /users/:userId/policies/:policyId controllers.PolicyController.attach(policyId: java.util.UUID, userId: java.util.UUID)POST /user/:userId/policies/:policyName ...
0
votes
0answers
35 views

How to use ScalaTest to test multiple simultaneous requests to db?

If you have some GET dao call, for instance:def getPersonById(perId: Long): Future[Person]={val getQuery=quote {query[Person].filter(_.personId==lift(perId))}context.run(...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,