내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

sling:target to /geohome on the /content node

Avatar

Level 7

Hi,

I just noticed that the /content node has the following two properties:

    sling:target = /geohome
    sling:resourceType = sling:redirect

Is it advisable to change these values for an in-production installation?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10

Yes please.

You need to update the property "sling:target" on the "/content" node OR configure RootMappingServlet. Configuring at /content you can activate through package.

You have two options:-

Option1:- At repository for publish run mode configure RootMappingServlet [1]. Steps would be

* Create /apps/<projectname>/config.publish/com.day.cq.commons.servlets.RootMappingServlet
* Define property rootmapping.target with value equal to home page path.
* Activate /apps/<projectname>/config.publish/com.day.cq.commons.servlets.RootMappingServlet

[1] http://<host>:<port>/system/console/configMgr/com.day.cq.commons.servlets.RootMappingServlet

Option 2:-
* Modify sling:target on the "/content" node of author.
* Create a package to include only content using exclude filters (attaching snapshot). Once the package is built. Activate the package & will get pushed to publish instance and get installed automatically. More samples of package filter at http://aemfaq.blogspot.com/2013/04/cq5-package-filter-includeexclude.html

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Level 10

Yes please.

You need to update the property "sling:target" on the "/content" node OR configure RootMappingServlet. Configuring at /content you can activate through package.

You have two options:-

Option1:- At repository for publish run mode configure RootMappingServlet [1]. Steps would be

* Create /apps/<projectname>/config.publish/com.day.cq.commons.servlets.RootMappingServlet
* Define property rootmapping.target with value equal to home page path.
* Activate /apps/<projectname>/config.publish/com.day.cq.commons.servlets.RootMappingServlet

[1] http://<host>:<port>/system/console/configMgr/com.day.cq.commons.servlets.RootMappingServlet

Option 2:-
* Modify sling:target on the "/content" node of author.
* Create a package to include only content using exclude filters (attaching snapshot). Once the package is built. Activate the package & will get pushed to publish instance and get installed automatically. More samples of package filter at http://aemfaq.blogspot.com/2013/04/cq5-package-filter-includeexclude.html

Avatar

Level 7

Hi Sham,

Thanks for the reply. Could you please explain the purpose of the "sling:target" on the content node? I mean, if I open localhost:4502/content, it redirects to the given target, but what's the use case for this?

Avatar

Level 10

LinearGradient wrote...

Hi Sham,

Thanks for the reply. Could you please explain the purpose of the "sling:target" on the content node? I mean, if I open localhost:4502/content, it redirects to the given target, but what's the use case for this?

 

The destination of request for route ("/" alias landing page)  is decided by root mapping servlet (http://localhost:4502/system/console/configMgr/com.day.cq.commons.servlets.RootMappingServlet) based on run mode. OOB in author instance  it is /welcome & publish instance it is /content.   The /content does not have any resource to render & it redirect to vanity url so that page can be rendered.      We unnecessarily  introduced RootMappingServlet which could be well handled with vanity path with highest ranking might be in future release we will get rid of RootMappingServlet.   Make sense?