Caveat: I started with Play and scala like… yesterday
So please take this with a grain of salt.

For all I know- this may have more misinformation rather than information.
However, if I did learn something contrary to what i have put here, I will come back and correct this post

Here goes… (unless specified otherwise, all use scala)

1. html file names

If you are adding new html files under apps/view, you need to name them as xyz.scala.html. You can then direct to them from controller as follows:

def tasks = Action {
         Ok(views.html.bean(Task.all(), taskForm))

Interestingly java template project also has file names with the same pattern.

2. Modes

To run the app in dev mode, use run start is for production

(seriously? we needed two commands for this ?)

3. stopping app

For prod mode- seems like there is no command to stop the application. (There was in 1.x)

So you need to do a kill or use the windows task manager (yuk !). You will also have to delete a file RUNNING_PID from your app root.

In dev mode- things are simpler. Simply CTRL-D will stop the application.

4, Persistence exception ?

This is what I got

[PersistenceException: Query threw SQLException:Table "TASK" not found; SQL statement: select c0, t0.label c1 from task t0 [42102-158] Bind values:[null] Query was: select c0, t0.label c1 from task t0 ]

I see this after an extended period of inactivity on my play app running in dev mode against H2 in memory database. Solution? Restart the app.

© 2011 Technology Cafe Suffusion theme by Sayontan Sinha