java - Internal redirect for POST in Play apps? -
i'm using play framework 2.0.3 , add filter internally re-route requests (that is, without 301/302) url in app determined dynamically. is, endpoint i'll need forward depends on request, don't know @ compile time controller/action it'll be, , can't call them directly.
for example, if request get /foo?redirectto=/bar
, how make play internally route/process if post /bar
?
this gist best guess far, has limitations: https://gist.github.com/brikis98/5582159
just call corresponding controller method.
java version:
public static result foo() { return bar(); } public static result bar() { return ok(); }
am missing something?
Comments
Post a Comment