Mudanças entre as edições de "Request Resolution in Adobe AEM"
(Criou página com ' == Request Resolution Example 1 == http://myhost/content/corporate/jobs/developer.html Notice how the resolutions starts at `content` folder, then uses a file in `apps` fol...') |
|||
(6 revisões intermediárias pelo mesmo usuário não estão sendo mostradas) | |||
Linha 1: | Linha 1: | ||
+ | Before trying to understand request resolution, [http://www.basef.com.br/index.php/Adobe_AEM_URL_Decomposed take a look at URL decomposition] to see how the URL is decomposed. | ||
− | == Request | + | The process looks like this: |
+ | |||
+ | a) After the URL Decomposition process, the following URL properties are extracted: | ||
+ | Protocol | ||
+ | Host | ||
+ | Path | ||
+ | Selector(s) | ||
+ | Extension | ||
+ | Suffix | ||
+ | Param(s) | ||
+ | |||
+ | b) The `'''path'''` component of the URL is matched against a node in `'''content'''` folder | ||
+ | |||
+ | c) If the node is found, it uses one of the following properties to try to locate the resource: | ||
+ | |||
+ | `sling:resourceType` | ||
+ | `sling:resourceSuperType` | ||
+ | `jcr:primaryType` | ||
+ | |||
+ | d) Using the value of one of the above properties, it tries to locate this resource under one of these folders: | ||
+ | |||
+ | `apps` | ||
+ | `libs` | ||
+ | |||
+ | e) When it finds the correct folder, it chooses a node with the '''best match''' based on some of the URL properties: | ||
+ | |||
+ | `Selector` | ||
+ | `Extension` | ||
+ | `Method` | ||
+ | |||
+ | [[Arquivo:request-resolution-2.png]] | ||
+ | |||
+ | |||
+ | == Best match == | ||
+ | |||
+ | Suppose a request with the following characteristics: | ||
+ | |||
+ | a) Method '''GET''' | ||
+ | |||
+ | b) Selector '''print.a4''' | ||
+ | |||
+ | c) Extension '''html''' | ||
+ | |||
+ | d) sling:resourceType '''hr/jobs''' | ||
+ | |||
+ | The best match will be one of the following nodes: | ||
+ | |||
+ | Biggest priority | ||
+ | apps/hr/jobs/print/a4.html.jsp | ||
+ | apps/hr/jobs/print/a4/html.jsp | ||
+ | apps/hr/jobs/print/a4.jsp | ||
+ | apps/hr/jobs/print/print.html.jsp | ||
+ | apps/hr/jobs/print/print.jsp | ||
+ | apps/hr/jobs/print/html.jsp | ||
+ | apps/hr/jobs/print/jobs.jsp | ||
+ | apps/hr/jobs/print/GET.jsp | ||
+ | libs/hr/jobs/print/a4.html.jsp | ||
+ | libs/hr/jobs/print/a4/html.jsp | ||
+ | libs/hr/jobs/print/a4.jsp | ||
+ | libs/hr/jobs/print/print.html.jsp | ||
+ | libs/hr/jobs/print/print.jsp | ||
+ | libs/hr/jobs/print/html.jsp | ||
+ | libs/hr/jobs/print/jobs.jsp | ||
+ | libs/hr/jobs/print/GET.jsp | ||
+ | Lowest priority | ||
+ | |||
+ | |||
+ | == Request Example == | ||
http://myhost/content/corporate/jobs/developer.html | http://myhost/content/corporate/jobs/developer.html | ||
− | Notice how the resolutions starts at `content` folder, then uses a file in `apps` folder by `sling:resourceType` reference: | + | Notice how the resolutions starts at `'''content'''` folder, then uses a file in `'''apps'''` folder by `'''sling:resourceType'''` reference: |
+ | |||
+ | [[Arquivo:request-resolution-1.png|500px]] | ||
+ | |||
− | |||
[[Category: Adobe AEM]] | [[Category: Adobe AEM]] |
Edição atual tal como às 11h27min de 23 de maio de 2018
Before trying to understand request resolution, take a look at URL decomposition to see how the URL is decomposed.
The process looks like this:
a) After the URL Decomposition process, the following URL properties are extracted:
Protocol Host Path Selector(s) Extension Suffix Param(s)
b) The `path` component of the URL is matched against a node in `content` folder
c) If the node is found, it uses one of the following properties to try to locate the resource:
`sling:resourceType` `sling:resourceSuperType` `jcr:primaryType`
d) Using the value of one of the above properties, it tries to locate this resource under one of these folders:
`apps` `libs`
e) When it finds the correct folder, it chooses a node with the best match based on some of the URL properties:
`Selector` `Extension` `Method`
Best match
Suppose a request with the following characteristics:
a) Method GET
b) Selector print.a4
c) Extension html
d) sling:resourceType hr/jobs
The best match will be one of the following nodes:
Biggest priority apps/hr/jobs/print/a4.html.jsp apps/hr/jobs/print/a4/html.jsp apps/hr/jobs/print/a4.jsp apps/hr/jobs/print/print.html.jsp apps/hr/jobs/print/print.jsp apps/hr/jobs/print/html.jsp apps/hr/jobs/print/jobs.jsp apps/hr/jobs/print/GET.jsp libs/hr/jobs/print/a4.html.jsp libs/hr/jobs/print/a4/html.jsp libs/hr/jobs/print/a4.jsp libs/hr/jobs/print/print.html.jsp libs/hr/jobs/print/print.jsp libs/hr/jobs/print/html.jsp libs/hr/jobs/print/jobs.jsp libs/hr/jobs/print/GET.jsp Lowest priority
Request Example
http://myhost/content/corporate/jobs/developer.html
Notice how the resolutions starts at `content` folder, then uses a file in `apps` folder by `sling:resourceType` reference: