Expand my Community achievements bar.

Sling taglib

Avatar

Level 1

Why did Adobe choose to reference an old sling taglib definition in /libs/foundation/global.jsp in AEM 6.2?  The reference is <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %> - it seems that it really should be <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling" %>.  With the older reference, we do not have access to methods (like getProperty) that were exposed. So basically we are forced to overlay global.jsp.

4 Replies

Avatar

Level 10

We started a discussion about this and internal Adobe ppl replied: 

is the taglib definition in the global.jsp really important?

I remember that I upgraded the Sling taglib to get the <adaptTo> tag back in the days, and it was just an update to the o.a.s.scripting.jsp.taglib  OSGi bundle.

Hope this helps.. 

Avatar

Level 1

smacdonald2008 wrote...

We started a discussion about this and internal Adobe ppl replied: 

is the taglib definition in the global.jsp really important?

I remember that I upgraded the Sling taglib to get the <adaptTo> tag back in the days, and it was just an update to the o.a.s.scripting.jsp.taglib  OSGi bundle.

Hope this helps.. 

 

The taglib definition is important.  Without changing to the updated URI as defined on https://sling.apache.org/documentation/bundles/scripting/scripting-jsp.html, the tags that are added in the newer bundle are still not available.  In other words, if we stick with the taglib definition in /libs/foundation/global.jsp, then things like <sling:getProperty> do not work, even though we are using the newer bundle (as provided in 6.2).  

Avatar

Level 10

The thing is they want people using HTL - not JSP. Here is the response: 

In essence, the problem is one of backwards compatibility. Given that we are recommending that customers do all new development in HTL, a potentially breaking change with a trivial workaround was deemed too risky

Avatar

Level 10

Another response from an Adobe AEM person: I would recommend overlaying global.jsp anyway.  If at some point in the future they have a need to make a global change across all JSPs, they’ll have that option available to them.