playframework 1 « playframework « Java Enterprise Q&A





1. When is it beneficial to have multiple Play applications instead of one monolithic one?    stackoverflow.com

I've settled on the Play framework for the rewrite of our intranet portal. Our portal contains a lot of loosely related stuff so I'm looking for advice on if or ...

2. Can someone explain how to use FastTags    stackoverflow.com

There are two ways to create customs tags with the play framework.

  1. By defining a groovy template in app/view/tags
  2. Directly in pure java by having a class extend FastTags
The latest is NOT documented. ...

3. Success stories from Play! Framework?    stackoverflow.com

I'm evaluating the Play! Framework for my company. We're actually thinking about using it as spring's small brother (basically for "smaller enterprise projects"). Up to now, we use Grails there, but ...

4. Playframework is active menu item / route    stackoverflow.com

I would like to style the active menu item, to do this i need to compare the current url agains a route. I know that I can do this in javascript, ...

5. How does Play!'s Comet support work?    stackoverflow.com

I saw the Akka module's description says that Play has great Comet support, but I've never used Comet before and I can't find any mention of it ...

6. how to read a file from server in play framework    stackoverflow.com

I have the following file

/app/menus/menu1.yml
and I'd like to read it's contents -- short answer:
fileContent = play.vfs.VirtualFile.fromRelativePath("/app/menus/menu1.yml").contentAsString();

7. How to apply a global filter in playframework    stackoverflow.com

When using @before, it is only used in one class. How do I apply a global filter in playframework? So that one filter is used for all controller classes.

8. How to extend the playframework?    stackoverflow.com

Sometime it's necessary to extends a framework. Sometimes it's necessary to hook into the request/response lifecycle, for example for a parameter binding or to write a security module. How could this be ...

9. Does Play Framework support "snippets"?    stackoverflow.com

If i want to have a common piece of UI across multiple pages, such as a menu, what is the recommended way to do this? It would contain both template ...





10. Play Framework: How to change play default packages?    stackoverflow.com

I was just wondering if it is possible to change the default packages from Play. For example: I want to change the "controllers" package to "com.test.controllers". I don't know if this ...

11. Where do I put startup code in Play Framework?    stackoverflow.com

I want to run some code on startup to pre-cache some stuff, and would also like to start a Timer to re-cache some things outside the critical path of a web ...

12. How do I store a cookie in Play Framework?    stackoverflow.com

I want to store an authentication token with Play Framework that outlives the current session, perhaps for days or even weeks - so that users don't have to login every time. What ...

13. How does the Play Framework function?    stackoverflow.com

I love Play!. Compared to other enterprise Java frameworks, it's incredibly simple for the developer to use. But, how does it do that? What makes the edit-refresh cycle possible with a compile ...

14. Play! framework uses a of statics    stackoverflow.com

Waaah, the Play! framework has so many static methods. Where I go to school, we were told never ever to use any statics, yet Play! uses it like there's no tomorrow. ...

15. How to use ORDERBY with findAll() in Play    stackoverflow.com

is there any way i can use ORDERBY with findAll() in Play Framework?

16. play framework with ActiveJDBC    stackoverflow.com

I intend to use play web framework with AciveJDBC for persistence. The issue with active JDBC is that it requires instrumentation. My question is , Will i need to do a restart ...





17. Play framework long running jobs    stackoverflow.com

I have some play jobs that perform long actions (say 10 seconds). Some of what they do needs a db transaction and some don't. Since the entire job is a single transaction, I ...

18. Cannot download play-1.1.1 completely    stackoverflow.com

I downloaded play-1.1.1 so many time from http://download.playframework.org/releases/play-1.1.1.zip. But I've never got completed file total 48.3MB. Any ideas? Thanks in advance. Nopphadon P.

19. Forcing to use a class from another package with the same name of a class in the current package    stackoverflow.com

since you guys helped me out, I stumbled upon a strange 'issue' while programming Java. I'm programming in the Play framework. It uses a lot of equally named classes among a number ...

20. playframework auto-test Jenkins CI wait for completion?    stackoverflow.com

I am trying to set up Jenkins CI for a playframework.org application but am having trouble properly launching play after the auto-test command is run. The tests all run fine, but it ...

21. What is pro and contra of using Play Framework?    stackoverflow.com

Can you provide a brief comparison of Play framework vs: Spring Roo, Grails, Django. In terms of

  • learning curve
  • performance
  • maturity
  • speed development/code reuse
  • convention over configuration

22. play framework inter-app communication    stackoverflow.com

Since Play currently supports using only one database per application, what's the best way for one Play application to access the data of another? Are there any better methods than ...

23. playframework1.2 has some Chinese garbled    stackoverflow.com

when i use the &{'unit'} , and the "unit=?" is in the file of ...

24. Changing table schema at run-time in Play! Framework    stackoverflow.com

What is the best way to change database table schema at run time in Play! Framework? I get an unspecified amount of columns from a client application and can not have ...

25. How Does Play compare to Stripes    stackoverflow.com

Hi has anyone had any experience using both Stripes and Play and can compare their strengths and weaknesses? I understand there are many similar questions such as Stripes, Spring, Play (or ...

26. How to install Jena SemanticWeb Framework in Play Framework    stackoverflow.com

I put jena jar files in the lib folder and see the message:

A JPA error occurred (Cannot start a JPA manager without a 
properly configured database): No datasource configured
what am I ...

27. should i use play framework or normal j2ee    stackoverflow.com

Am planning to start a website that i will use commercially. I recently have heard of the play framework and it looks good. But am not sure if i should use ...

28. how does await() work in play?    stackoverflow.com

In the playframework's documentation here has been written:

public static void loopWithoutBlocking() {
    for(int i=0; i<=10; i++) { 
         ...

29. business methods in playframework contolles    stackoverflow.com

Could somebody explain is it possible to have potected, pivate methods in playfamewok's contolles except:

public static void method-action-name() {}
For example if I would have method like this:
protected ...

30. PUT method in playframework FunctionalTest    stackoverflow.com

I wrote a little application using GAE and the playframework. I am trying to test the PUT method (used for updates) and when called from a FunctionalTest it always returns with the login ...

31. Play : Issues with using Youtube apis    stackoverflow.com

I did the following
- created a new play project using play new projectx
- added all relevant jars needed to access youtube api(through command-line to projectx/lib)
- did play eclipsify and imported the ...

32. How to use JasperReports with Play Framework    stackoverflow.com

Im searching the web but still couldn't find any way to integrate JasperReports with the Play Framework. Have any of you did it before? If so please show me what is ...

33. Integrating Play! with existing applications    stackoverflow.com

I have a database (on PostgreSQL) and a set of Java SE 1.6 applications using Hibernate 3 and Spring 3. I now need to expose the service layer via a ...

34. Is there any way to substitute environment variables in playframework's application.conf?    stackoverflow.com

Is there any way to use environment variables in the play! application.conf file? Something like this:

%prod.db.url=${env.DATABASE_JDBC_URL}
%prod.db.driver=org.postgresql.Driver
%prod.jpa.ddl=validate
I don't want to hardcode the URL in my application.conf because it contains credentials that the ...

35. @Autowired bean in Play! Framework    stackoverflow.com

We know that if we use Spring framework we can use @Autowired bean for class and define in the applicationContext.xml I want to do something like following:

There are ...

36. Question about HSQLDB and Play!    stackoverflow.com

I'm studying Play!. I'm using the HSQLDB embedded inside the framewok. It works fine form my needs but I need to connect to it using a sql client (I tried with ...

37. Is possibile in siena to order by a calculated field?    stackoverflow.com

I'm trying to get a query returned ordered on a filed which is calculated in Play. This is the query I'm using.

return all().order("points").fetch();
where points is defined as
public Integer points;
and is retrieve thanks ...

38. How do I disable H2 in the Play Framework    stackoverflow.com

We are using Play with Objectify/GAE and do not need any RDBMS. How do I disable the db service (H2)?

39. Play framework job queue    stackoverflow.com

How does play handle asynchronous jobs when they are called using the now() method? Are they executed immediately, or are they stored in a queue and processed by a fixed number ...

40. Play Framework await() causes UnexpectedException    stackoverflow.com

I upgraded to Play 1.2.1 this morning so I could make use of their new asynchronous programming with HTTP features. When I use the example below, from the Play documentation ( * ...

41. how much jave I have to know before play play?    stackoverflow.com

I heard lots of good things about playframework. Upon checking their website, I am really impressive on how it does on Java. I have some basic java knowledge, not sure how ...

42. How to define every five minutes to run jobs    stackoverflow.com

How to define every five minutes to run jobs in the play.jobs.every class ,it define an example every("1h") to run job every hour,bu i want to run every 5 minutes,how to define ...

43. What is the aim of FunctionalTest in PlayFramework?    stackoverflow.com

I'm writing tests for my project, and after the Unit Tests, I'm now writing FunctionalTest. But between the aim of Functional vs Selenium test, I'm a bit lost. Is the functional test are just ...

44. Play! - max constraint doesn't work    stackoverflow.com

I'm having a problem with my application and @Max constraint annotation. My controller method is defined like this:

public static void save(@Required @Max(255) String content)
Later in my code I have error check:
if (Validation.hasErrors()) ...

45. Cannot load fixture because of wrong duplicate id detection    stackoverflow.com

I'm trying to load data with the help of Fixtures.loadModels() during application start (@OnApplicationStart) My data file is quite simple, but I'm continuously getting error about duplicate id. However, there is no ...

46. Problem with file location when using Fixtures.loadModels("...")    stackoverflow.com

I'm using the Play Framework yabe tutorial and came across a problem when adding tags. I'm not sure what code I added that caused the change, but now the Fixtures.loadModels(data.yml) piece ...

47. Is this processus to pay a user, reliable and safe?    stackoverflow.com

I'm working on a project that require my application to pay the user to his paypal account when he asks it. Here's how I did it so far:

  1. The (logged) user goes to ...

48. Play! hash password returns bad result    stackoverflow.com

I'm using Play 1.2.1. I want to hash my users password. I thought that Crypto.passwordHash will be good, but it isn't. passwordHash documentation says it returns MD5 password hash. I created ...

49. Fixtures.deleteDatabase() does not reset auto_increment    stackoverflow.com

I'm new to play! This is a really newbie question, but I just can't get around it... I ran through play-scala's tutorial (yabe), and was blocked at round 2.

it should "retrieve Posts ...

50. What is port 8000 used for in play    stackoverflow.com

Listening for transport dt_socket at address: 8000 The above string is spewed out during Play Framework initialization, how is this port used?

51. Concurrently running Schedules Jobs using Play! Framework    stackoverflow.com

I have a Play! Framework Job that executes every 30 seconds:

@Every("30s")
public class MyJob extends Job { ... }
This job does a few things such as reading e-mails and writing to the ...

52. Where to put dependent jars in its own folder in play framework project?    stackoverflow.com

I have a situation where I need to place very large number of jars coming from different third party sources under lib folder of play framework and that should work. But ...

53. Why isn't PlayFramework recompiling my edited .java files properly?    stackoverflow.com

I have been working with the Play! Framework for a few weeks now, and am really enjoying it. Occasionally I have an issue come up which is frustrating ...

54. Remote call to a PlayFramework object    stackoverflow.com

I am looking for a way to send serialized objects (or simply strings) to a PlayFramework model or controller object through a remote JVM. I am trying to create a web application ...

55. Manage online users in stateless application?    stackoverflow.com

I'm working on a browser game with the play framework. The game allows users to "fight" with each other. But only users that are online can fight with each other and ...

56. Create a bidirectional ManyToOne relation    stackoverflow.com

Hi I try to create a ManyToOne relation but get stucked. I have a BILL and a Booking Class The realation is : A Bill can have many Bookings. (1:m) The Bill Class should manage ...

57. Play Framework routing with multiple parameters    stackoverflow.com

I'm trying to setup a SEO friendly route in the Play! Framework that has multiple parameters (with the 2nd parameter being optional). What I'm aiming for is:

http://domain.com/article/jsmith/name-of-article
But what Play is ...

58. Play framework: How can i use "conf/messages"-messages in html-files?    stackoverflow.com

How does it work? Simply with &{messages.message1} when the messages file looks like this: message1 = hallo

59. Close InputStream after renderBinary() call in Play Framework    stackoverflow.com

In the Play framework there is a render method called renderBinary where it is possible to render an InputStream. It was my understanding that no code is run after the renderBinary() method ...

60. why all fields are public in playframework?    stackoverflow.com

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 ...

61. Playframework: Upgrade process -- Best Practices    stackoverflow.com

I'd very much appreciate anyone sharing best-practices, patterns, anti-patterns, backup, rollback processes that you have formulated for a pain-free, foolproof, Play framework upgrade. I'm thinking just replacing the bin/play directory with the ...

62. Oops. conf/routes or conf/application.conf missing.?    stackoverflow.com

I followed the "Learn" on play official site. I am using window 7+Chrome.

  D:\tester\play>dir
 Volume in drive D is APPLIS
 Volume Serial Number is 9037-F7BD

 Directory of D:\tester\play

07/15/2011  ...

63. Passing values to inner class method?    stackoverflow.com

Promise<List<WrapSpec>> wrapSpecPromise = new Job() {
                @Override
          ...

64. What version of jdk does Play 1.2.2 need anyway?    stackoverflow.com

C:\Dev\play-1.2.2>play run \dev\myFirstApp
~        _            _
~  _ __ | | __ _ _ ...

65. Limit Java Heap Space for play framework globaly    stackoverflow.com

I have a very old linux system and installed java and play framework. When I run java I get:

java -version
Error occurred during initialization of VM
Could not reserve enough space for object ...

66. excluding classes from hot-reloading in Play Framework    stackoverflow.com

I'm experimenting with the Play Framework and really like the experience thus far! Especially hot-reloading is a huge time saver. However, I want to be able to exclude some class-instances from hot-reloading ...

67. Does play framework server have rewrite_mode like apache?    stackoverflow.com

Does play framework server have a rewrite_mode functionality like apache? That is: how can play generate url like:

domain/controller/action/etc... and not 
domain/controller.jsp? etc....
Thanks.

68. Play! server: listen to single domain name    stackoverflow.com

I'm trying to get the Play! server listen to a single domain name instead of all domain names that are configured for this server. I.E. I have two web-services running on two ...

69. Play framework longpolling in online game    stackoverflow.com

I'm working on a browser game with the play framework, and I definitely need longpolling, but I don't quite understand how to use it. WebSockets would be perfect for this, but ...

70. NPE Null Pointer Exception in Yabe    stackoverflow.com

I'm working through the Yabe tutorial and have run into some Null Pointer Exception in the test useTheCommentsRelation

useTheCommentsRelation

A java.lang.NullPointerException has been caught, null
In /test/BasicTest.java, line 96 :

 bobPost.addComment("Jeff", "Nice post"); 
 ...

71. how can i access the table not created by @entity?    stackoverflow.com

I know that i can use @entity to create a table in playframework. But now I have a table in the same database but was created by James. I want to ...

72. Play server as a thrift endpoint?    stackoverflow.com

I'm new to play framework and have previously only used PHP to implement thrift clients/servers. I want to implement a thrift service using play. Where should I put the java files generated ...

73. is there any way to integrate dwr 3.0 with play?    stackoverflow.com

DWR is a very good java ajax framework. and it has bean integrate with many frameworks like struts2, spring, hibernate... and many other client ajax frameworks, like dojo, tibco ...

74. Getting a resource file as an InputStream in Playframework    stackoverflow.com

Play.classloader.getResourceAsStream(filepath); 
filepath - relative to what? project root? playframework root? absolute path? Or maybe the usage Play.classloader.getResourceAsStream is wrong?

75. Devise equivalent in Play Framework?    stackoverflow.com

I need a authentication solution like Devise for an app that I am writing using Play Framework. I'd appreciate any pointers towards a full fledged solution or work in ...

76. cannot include roots in play framework    stackoverflow.com

I have created a module called design inside /var/www/html/play-1.2.2/modules/design I have my play application in /var/www/html/MyPlayApp In MyPlayApp dependencies.yml i have given

require:
    - play
    - play -> ...

77. why does captcha fail on ie 9    stackoverflow.com

On a browser by browser comparison. Captcha in the yabe example worked great on Firefox 5.0 but was randomly generated junk on Internet Explorer 9

?PNG  IHDR?2??" IDATx??\}lE?*P+-RK??4DkD?j"*?F$?j$(?b? *??>BA??"}?&5"??1?b?? ??ZE?h@c@- ...

78. Parsing atom:link field in XML with XPath from Play.libs    stackoverflow.com

I'm working on a web application on Paly! Framework. I have to parse a XML document. I'm using XPath from Play.libs. Here is the piece of Document, I don't succeed to retrieve : ...

79. Play! Framework GenericModel edit method more details    stackoverflow.com

where is the detailed documentation/source code for the edit method of the GenericModel class? edit(java.lang.Object o, java.lang.String name, java.util.Map params, java.lang.annotation.Annotation[] annotations) Basically I want to see some detailed explanation on ...

80. Experiences on free and low-cost hosting for play framework applications?    stackoverflow.com

I'd like to know your experience finding a host for play applications on free or low-cost servers So far now I found the following options:

  • Playapps A cloud hosting solution by zenexity, ...

81. How to define frequency of a job in application by users?    stackoverflow.com

I have an application that has to launch jobs repeatingly. But (yes, that would have been to easy without a but...) I would like users to define their backup frequency in ...

82. General structure of classes suited for unittest    stackoverflow.com

I'm working on a play app and want to improve my test coverage before going too far with the project. So far I have quite good test coverage on the model ...

83. experience with play! framework big applications maintainability    stackoverflow.com

Play! framework really lets you get up and running quickly, but I wonder how hard it gets to maintain applications once they start to grow in size and complexity... anyone knows of ...

84. PlayFramework private repos    stackoverflow.com

I m currently setting up play in my agency. I'd like to do some gouvernance with the module the developpers can use.
Is it possible to host mirror repositories of the Play ...

85. playframework subdirectory dinamic    stackoverflow.com

Is any form to create subdirectories dinamicly in playframework?, I was thinking in a commom interceptor like spring, but.. how can I do it in play??, thanks for any help

example.com/event1
example.com/event2
example.com/event3

86. How to create JARs for inclusion in Play's /lib directory    stackoverflow.com

[Noob question] I downloaded jBCrypt which contains two files, BCrypt.java and a test file. I am new to packaging Java, and I know that the /lib directory needs .jar files. I know ...

87. how to separate the router file of playframework    stackoverflow.com

I just want to separate the routes file (conf/routes).It looks not so elegant that one routes file contain so many routes .How can i divide the it into several routes files ...

88. Attachments in Play! Framework on dotcloud    stackoverflow.com

I upload files to the servre using BLOB db type on play framework. In the application.conf file I have attachments.path=home/dotcloud/uploads But no files i could find on the server The issue is that if ...

89. What is the point of @{'/path/to/static_content'} in PlayFramework?    stackoverflow.com

If I'm writing an HTML template that contains a reference to a URL in Play!, then I can do it in one of two ways. Like normal HTML:

<img src="/public/images/bananas.png">
Or with the ...

90. Customize the 'admin' dataList    stackoverflow.com

I try to customize the admin screens provide by the CRUD Module and it works pretty good. But, if I want to set my CRUD-Controllers in an other package than app/controllers (i.e ...

91. Fixtures.loadYaml in FunctionalTest didn't really load the data    stackoverflow.com

I have the following functional test that setup the initial data via fixtures.loadYaml, but when I query the records in testcase, I don't see them. Any reasons?

public class UsersTest extends FunctionalTest ...

92. Extending GenericModel for Play Framework    stackoverflow.com

I need to add some logic to GenericModel by means of extending it, but I understand that Play uses generics to enhance the GenericModel. What would be the right and most ...

93. playframework: dropdownlist selected value    stackoverflow.com

How to pass a value from one dropdown to a second dropdown. Example: Template

#{select 'pl'}

            #{list platforms, as: 'platform'}
    ...

94. New annoying NPE on Yabe (Creating a custom editor)    stackoverflow.com

I'm winding throught this Yabe tutorial and have been happily get bugs and solving them on my own.... until now. in

http://localhost:9000/@documentation/guide9
This is the part about customizable edit window.. For whatever reason, when ...

95. advice on implementing a shopping cart using playframework    stackoverflow.com

I am learning to use playframework by writing code to implement a webstore for selling items.I have implemented the Admin area using the crud and secure modules.Now, I want to create ...

96. How to use logback in a PlayFramework project    stackoverflow.com

Because of dependencies on a project I am working on developing a web application using the Play!Framework, I have to configure logback to prevent it from flooding my output with DEBUG ...

97. Play framework entry point    stackoverflow.com

When I send a request from my browser to Play! on localhost:9000, what object/method in PlayFramework first starts processing my request to the server? I know PlayFramework uses netty framework to work ...

98. OutOfMemoryError occured : Java heap space in play framework    stackoverflow.com

I am creating play-based web application with java. When I run it an error occured with the following error:

Execution exception (In /app/controllers/Application.java around line 12)
OutOfMemoryError occured : Java heap space

play.exceptions.JavaExecutionException: Java ...

99. backward compatibility of play-1.2.3    stackoverflow.com

When upgrading from Play 1.2.1 to 1.2.3, I get some compilation errors. For instance: WsAsync.newRequest takes now two parameter instead of one. Play 1.2.3 has got two play jars: Play.jar and play-1.2.3.jar. ...

100. How do I reverse route a static file?    stackoverflow.com

At first I had this link to a twitter icon:

@{'/public/images/twitter-icon.png'/}
But now I want to show a Twitter-, Facebook- or LinkedIn icon depending on type. So, I created a FastTag that takes ...