java - What is Request Response Cycle in Play -


I just started working on 2.0, although this is not so complicated yet, but I'm not really basic Requesting Response Cycle Request

Actually a request is handled by HTTP router, which Finds a URL like: mydomain.com/details/ Then it tries to see this entry in your routes config file. On the first matching line in L, there is a consistent method (a control method) for that, so it invites the controller method, which will be given an HTML response parameter by a view to provide.

Simplified: Request (URL) - & gt; Find the route in the Route table - & gt; Call the steady controller method - & gt;

(You can parameterize URLs, such as: / description / 12 and in the passage table: / description /: ID, so that you can pass IDs for the control method)

One more thing: It is also possible to do "reverse routing", which is the parameter for example. One button to call a controller method directly, and it will find the URL associated with the root file

The official document is very good in this topic:

Comments