Srini Srini - 1 year ago 64
Scala Question

How to do reverse routing from subcontroller to the sub routes in play scala?

I have created the sub routes from main route and I have created the subcontroller package e.g controllers.subcontrollers. Now how to access my sub routes from sub controllers.

Trp Trp
Answer Source

You can access by using this:

// Redirect to /hello/Bob
def helloBob = Action {

As you can see in the playframework documentation.

But, if you meant that you have multiples controllers and divided them into packages and want to access them inside another another controller. You can achieve it using something like this:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download