Hi Saurabh
Sling Resolution is an important module in Sling. It is really important to understand the sling resolution before even starting AEM development. I have tried to explain the same here for a similar question here Template component can't override page.html . This explains how the files are resolved.
To answer your question simply,
if the user request a content as --> <path>.<selector...>.<extension>
then for the request resolution files ending with <selector>.<extension>.<script extension> takes priority
Always understand that selectors have maximum priority and the more selectors are matched the highest the priority. If selectors are not matched then the extension gets priority.
Here in your case sling priority looks like below
1. homepage.html.jsp
2. homepage.html
3.homepage.jsp
4.GET.html.jsp
5.GET.html
6.GET.jsp
This is best explained in [SLING-387] Simplify script paths and names - ASF JIRA . Please read and let me know if you have more questions. Adding below few more reads for you
Please read the URL decomposition under https://docs.adobe.com/docs/en/aem/6-3/develop/the-basics.html#URL Decomposition
From the above link
Hope this helps you
.
Thanks
Veena