Expand my Community achievements bar.

SOLVED

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 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

4 Replies

Avatar

Correct answer by
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