Back to Library

Accessing Resources

  <script src="@{'/public/javascripts/jquery-1.4.2.min.js'}" 
  type="text/javascript" charset="utf-8"></script>

PlayFramework inbuilt DB

  • playframework comes with h2 database (in memory) built in. Typing /@db at the url and the h2 database console will be launched.

To start an in-memory H2 database instance, just add this line to your conf/application.conf file:


If your prefer to save the database in the file system, use:


If you want to connect to an existing MySQL5 server, use the following:


Playframework Jobs

Jobs can be dropped into any java package and use the play framework jobs annotations

public class Bootstrap extends Job {

	public void doJob() {
		System.out.println("jobs running");

Playframework Json

With Play, it is extremely easy to create a REST service that exposes some model objects in JSON format.

If we write this line in the routes file :

GET     /data.json            ExtjAction.DataInJson

Create a controller method

play_framework_notes.txt · Last modified: 2011/08/12 08:54 by root
RSS - 200 © CrosswireDigitialMedia Ltd