Sling Mappings not applied to JSP urls automatically in 6.0? | Community
Skip to main content
October 16, 2015
Solved

Sling Mappings not applied to JSP urls automatically in 6.0?

  • October 16, 2015
  • 4 replies
  • 1012 views

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?

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 gopalKa

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

4 replies

gopalKaAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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

October 16, 2015

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?

Adobe Employee
October 16, 2015

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.

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

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