[2.0.x] is there some way to programmatically modify routes?

285 views
Skip to first unread message

sas

unread,
Aug 10, 2012, 12:08:03 PM8/10/12
to play-fr...@googlegroups.com
something like adding a prefix to every route or doing some other maniplation

in play1, I remember you could process the routes file like if it were a template, which gave you lots of flexibility

with play2, being the routes fils compiled, I understand we can't have that much flexibility, but maybe there's some way to hack into it

Manuel Bernhardt

unread,
Aug 12, 2012, 9:29:48 AM8/12/12
to play-fr...@googlegroups.com
You could use interceptors:

https://github.com/playframework/Play20/wiki/JavaInterceptors
https://github.com/playframework/Play20/wiki/ScalaInterceptors
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/v-0-ki2ipFUJ.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.

sas

unread,
Aug 12, 2012, 9:21:47 PM8/12/12
to play-fr...@googlegroups.com
Thanks a lot manuel, following your advice I managed to come with an initial attempt


the only thing that is giving me headaches, is how I can hack into the reverse routing system...

I coulnd't find anywhere to hook in

any idea?

Julien Richard-Foy

unread,
Aug 13, 2012, 4:23:12 AM8/13/12
to play-fr...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages