[Play 2.0.3] Bad routes file: string matching regex `\z' expected but `:' found

493 views
Skip to first unread message

Michael Slinn

unread,
Sep 5, 2012, 5:14:11 PM9/5/12
to play-fr...@googlegroups.com
The following route definitions results in "string matching regex `\z' expected but `:' found ". Seems the parser does not expect any characters after 'staticDir".

GET     /                           controllers.Application.index

# Map static resources from the /public folder to the /assets URL path
GET     /assets/*file               controllers.Assets.at(path="/public", file)

# Test pages
GET     /public/                   staticDir:public

Ideas?

Mike

James Roper

unread,
Sep 5, 2012, 6:27:28 PM9/5/12
to play-fr...@googlegroups.com
Hi Mike,

The staticDir:public is play 1 syntax, it won't work in Play 2.  What are you trying to achieve?  With the line above it, you have everything in the "public" directory being served under the "/assets" path.

Cheers,

James

Mike Slinn

unread,
Sep 5, 2012, 6:33:41 PM9/5/12
to play-fr...@googlegroups.com
I want to create a static test page that does a POST to a route. Let's
say the page is called test.html; I want to invoke it as
http://localhost:9000/test.html.

Thanks,

Mike
Reply all
Reply to author
Forward
0 new messages