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

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

Mark Solution

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

해결됨

Sling Mappings not applied to JSP urls automatically in 6.0?

Avatar

Level 1

In 5.6.1 SP1 when one configures the "Apache Sling Resource Resolver Factory" "URL Mappings" parameter, such as adding new outgoing mappings, links that are written inside of JSP components (such as the href of an <a> tag) automatically have "ResourceResolver.map" applied to them to have the mapping applied.

Doing the same configuration in 6.0 SP2, This no longer seems to be occurring.

I've verified in testing with /system/console/jcrresolver that the mapping is applied correctly according to my expectation.

Are sling mappings no longer applied to JSP generated content automatically and need to be manually applied, or is there some new configuration option that needs to be enabled for this functionality now?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee

Can you try in geometrixx and let me know? This is not needed.

원본 게시물의 솔루션 보기

4 답변 개

Avatar

정확한 답변 작성자:
Employee

Can you try in geometrixx and let me know? This is not needed.

Avatar

Level 1

It worked for geometrixx, when i added "/content/geometrixx/en/</" to the "URL Mapping" configuration.

I noticed that we didn't have .html extensions in the links we have in our hrefs. After adding .html extensions the mapping is now applying as one would normally expect.

This seems rather odd that the .html extension is necessary for the mapping to apply automatically though, is this expected behavior?

Avatar

Employee

this is expected behaviour. Having no extensions will have issues with caching and issues like not identifying the type of content as well. The best way to do this in AEM is,to use a sling rewriter transformer to remove the html extensions and at apache a rewrite rule to add extensions.

Avatar

Employee Advisor

Hi,

basically the extension identifies the type of rendition you want to have. Just giving the resource itself is not enough. That's different to other systems, where you address not resources, but servlets or something else, and you have to have knowledge about the response's mime type upfront.

kind regards,
Jörg