Questions tagged [play2-mini]

Play-mini is a subset of the Play! Framework that consists of a REST layer sitting on top of the Netty NIO socket server. It offers the ability to deploy Akka applications for service layer jobs that don't need the rest of the Play tools (e.g. the MVC/interface layer).

25 questions
1
vote
1 answer

How to Support Parameters with Play Mini's REST?

I'm using Akka and Play Mini (which is just a REST layer on top of Netty). I'm using it from Java. The syntax is simple, covered in their readme on GitHub: @URL("/coco/*/name/*") This is working fine, but means that all URLs will have to be…
Rob
  • 11,446
  • 7
  • 39
  • 57
0
votes
0 answers

How to know weather request in new or old in play 2.x framework?

In play 1.x framework, there is a method under play.mvc.Http.Request class isNew(), which identifies whether the request is new or old. In play 2.x there is no such method available. Can anyone tell the alternative for isNew method for the above…
0
votes
1 answer

can't resolve symbol scala play2 with mysql result

Guys I am trying to get some results from mysql database and I am having error with fetching it onto scala.html file. Here are my codes: /*Customers.scala. Its controller*/ package controllers import play.api._ import play.api.mvc._ import…
jahid
  • 139
  • 2
  • 11
0
votes
1 answer

how to map form having more attributes than case class in play 2 with scala

val registrationForm: Form[Registration]=Form( mapping( "fname"->text(minLength=2), "lname"->text(minLength=1), "userEmail"->text(minLength=5), "userPassword" -> tuple( "main" -> text(minLength = 6), "confirm" -> text ).verifying( // Add an…
Jagveer Singh
  • 584
  • 7
  • 28
0
votes
1 answer

too many arguments for method mapping: (apply: (String, String, String) => R)(unapply: R => Option[(String, String, String)])play.api.data.Mapping[R]

val computerForm = Form( mapping( "id" -> ignored(NotAssigned:Pk[Long]), "name" -> nonEmptyText, "introduced" -> optional(date("yyyy-MM-dd")), "discontinued" -> optional(date("yyyy-MM-dd")), "company" ->…
user2563895
0
votes
1 answer

[Exception: DB plugin is not registered.]

package models import play.api._ import play.api.mvc._ import anorm._ import anorm.SqlParser._ import play.api.db.DB import play.api.Play.current import scala.language.postfixOps case class User(name:String) object User { def…
user2563895
0
votes
1 answer

how to work with promise in play 2.0 framework

i am working play 2.0 application with java.In that i am using promise for the Asynchronous sending of email.For that i followed http://www.playframework.org/documentation/2.0/JavaAsync I tried like this: Promise promiseOfInt = Akka.future( …
0
votes
2 answers

How to extract value from Path parameters in play2 mini?

The method I will use is DELETE request, and I have this url for web service call: http://www.localhost:9000/example/com/foo/bar I want to extract /foo and /bar and store it in a variable. Does anybody know how to do this? Thanks! I'm using…
jeypijeypi
  • 373
  • 1
  • 4
  • 12
0
votes
2 answers

Configuring Object Instances from JSON in conf Files

So I want to be able to basically make instances of a class from JSON definitions in a conf file. In looking through the docs, I found that there are ways to reference things that are defined in JSON structures, but I was wondering about how best to…
Rob
  • 11,446
  • 7
  • 39
  • 57
-1
votes
1 answer

error in mapping form to case class in play 2 for scala

val registrationForm: Form[Registration]=Form( mapping( "fname"->text(minLength=2), "lname"->text(minLength=1), "userEmail"->text(minLength=5), "userPassword" -> tuple( "main" -> text(minLength = 6), "confirm" -> text ).verifying( //…
Jagveer Singh
  • 584
  • 7
  • 28
1
2