Questions tagged [playframework-1.x]

The Play! Framework is a modern Java and Scala web application open-source framework that provides a clean alternative to bloated Enterprise Java stacks.

The Play! Framework is a modern Java (and Scala) web application open-source framework that provides a clean alternative to bloated Enterprise Java stacks.

736 questions
8
votes
2 answers

Play! Framework - Using MySQL and MongoDB for same application

Is it possible to user MySQL Database and MongoDb database for same project using Play! framework? for example: I want @Entity Person to interact with my MySQL database and @Entity PersonData to interact with my MongoDB database? How can…
daydreamer
  • 73,989
  • 165
  • 410
  • 667
7
votes
2 answers

Play 1.2.x UnexpectedException ContinuationEnhancer on helpers.CheatSheetHelper$2 invalid constant type: 15

Play framework 1.2.x starts with the following error: Oops: UnexpectedException An unexpected error occured caused by exception UnexpectedException: While applying class play.classloading.enhancers.ContinuationEnhancer on…
user1563700
7
votes
1 answer

Routing to default EDIT template with composite key in crud Play 1.2.4

I have a composite key of User Id and User Role in my DB. For mapping the DB with the model, below is the code: @Id @Column(name="ID") public int userId; @Id @Column(name="USER_ROLE") public String userRole; ...... ...... …
user182944
  • 7,197
  • 28
  • 96
  • 170
6
votes
1 answer

how to access Enum fields in playframework template

I have an Enum which has certain fields ,which I need to access in my play1.2.4 template public Enum WORKER{ FARMER,SMITH,GARDENER } Suppose I need to check if a 'person' variable in the template is a farmer,smith or gardener ,how can I do…
Damon Julian
  • 3,029
  • 4
  • 24
  • 33
6
votes
2 answers

HttpURLConnection redirects my POST request into a GET

I'm sending a HttpURLConnection with setInstanceFollowRedirects(true) and POST, get a redirect response that looks like this: HTTP/1.1 302 Found Server: nginx Date: Wed, 09 Jan 2013 20:47:56 GMT Content-Type: text/html;…
ripper234
  • 202,011
  • 255
  • 600
  • 878
6
votes
2 answers

How do I get the Hibernate Configuration after the EntityManagerFactory has been built?

My web framework (Play 1.2.5) creates an EJB3Configuration local to a method which it uses to create an EntityManagerFactory (source). I am working on a script and would like to run the generateSchemaUpdateScript() method from Configuration to make…
Ransom Briggs
  • 2,927
  • 3
  • 30
  • 46
6
votes
1 answer

How to test email logic with Play Framework

I got an class that extends Mailer and would like to have automatic tests for that. With mock mailer I can get the mail to console but how to test mail logic from the automated test? (Is there something like Mailer testing with Rails?) br, Touko
Touko
  • 10,399
  • 14
  • 71
  • 101
6
votes
5 answers

Should I Use Play framework 2.0 or go for play 1.x

As the current stat of play 2.0 Is it better to wait for It to be more mature and use play 1.x or go for play 2.0 as I notice that play 2.0 nearly have no plugins that exist for 1.x
Ahmed Aswani
  • 7,169
  • 7
  • 31
  • 52
5
votes
3 answers

Return HTTP Status "created" in Play! Framework

I have a create action in a Play! framework controller that should return the HTTP status code Created and redirect the client to the location of the created object. public class SomeController extends Controller { public static void create()…
deamon
  • 78,414
  • 98
  • 279
  • 415
5
votes
2 answers

why all fields are public in playframework?

I'm still in a question why with playframework all fields in the classes should be public? class A { public int a; public int b; } Some short explanation would be nice. As I know if they are public then playframework uses generated invisible…
ses
  • 12,339
  • 25
  • 106
  • 203
5
votes
1 answer

Play framework 1.x with java 8

How can I make play framework 1.x work with Java 8? Play framework version 1.2.5.3 Java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) Server VM (build 25.0-b70, mixed mode) I have an…
Artem
  • 453
  • 4
  • 19
5
votes
2 answers

after-action-before-render kind of interceptor (Play 1.x)

I know of the existence of @Before and @After, but @After happens to execute after the rendering of the template Almost all my controllers extends a specific class of mine, and I want to, unobtrusively, be able to execute some code in my super class…
AndresQ
  • 763
  • 4
  • 17
5
votes
5 answers

Local application.conf with Play 1.2.5?

Is there a possibility to use a local application.conf with Play 1.2.5? Our problem is that different developers have somewhat different setups that we don't want to save to version control. Alternatives found: Just modifying…
Touko
  • 10,399
  • 14
  • 71
  • 101
5
votes
2 answers

Deploy Play application locally

I am aware of at least two local options to deploy Play apps, this is, either copying the whole thing and running play start, or exporting a war to run it as part of another app server. I've also used the deploy mechanisms for gae and heroku. Very…
palako
  • 3,129
  • 2
  • 21
  • 32
5
votes
1 answer

how to determine the maximum number of parallel / simultaneous file downloads a play framework server can handle.for a fixed bandwidth

I am using play 1.2.4. I am providing a link to download images. A number of clients maybe trying to download the same image at the same time.I would like to know, how to determine the number of simultaneous clients 'n' that can download the image…
1
2
3
49 50