SLING REQUEST URL | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SantoshSai

Hi @prashanthal,

Suffix usually used to provide additional information to your servlet/JSP page. Just check editor interface in TouchUI: the url looks like

http://localhost:4502/editor.html/content/pageYouEdit.html

So you always stays on the same page /editor.html, but suffix notifies Edit Interface which page to edit. 

Reference: Here is the best example between selector and suffix has been answered - https://stackoverflow.com/questions/41345775/what-is-the-use-of-suffix-in-sling-urls

 

Best way to use suffix in AEM URLs

It is better to use the suffix with selectors only that will help the dispatcher when flush cache.
Eg:-
<resource path>/results.html

<resource path>/results.html/suffix (Not recommended )

<resource path>/results.html/suffix.suffix1 (Not recommended )

<resource path>/results.slelector.html/suffix (Recommended)

<resource path>/results.slelector.html/suffix.suffix1 (Recommended)
 
Hope that helps!
Regards,
Santosh

2 replies

SantoshSai
SantoshSaiAccepted solution
New Participant
November 7, 2022

Hi @prashanthal,

Suffix usually used to provide additional information to your servlet/JSP page. Just check editor interface in TouchUI: the url looks like

http://localhost:4502/editor.html/content/pageYouEdit.html

So you always stays on the same page /editor.html, but suffix notifies Edit Interface which page to edit. 

Reference: Here is the best example between selector and suffix has been answered - https://stackoverflow.com/questions/41345775/what-is-the-use-of-suffix-in-sling-urls

 

Best way to use suffix in AEM URLs

It is better to use the suffix with selectors only that will help the dispatcher when flush cache.
Eg:-
<resource path>/results.html

<resource path>/results.html/suffix (Not recommended )

<resource path>/results.html/suffix.suffix1 (Not recommended )

<resource path>/results.slelector.html/suffix (Recommended)

<resource path>/results.slelector.html/suffix.suffix1 (Recommended)
 
Hope that helps!
Regards,
Santosh
Santosh Sai
arunpatidar
New Participant
November 7, 2022

It depends on use case,

for example page editor use this to identify the page to be edited

http://localhost:1450/editor.html/content/myapp/us.html

 

 

Arun Patidar