Handling JSTL tags authored from dialog | Community
Skip to main content
Level 6
June 10, 2021
Solved

Handling JSTL tags authored from dialog

  • June 10, 2021
  • 2 replies
  • 1159 views

Hello All - Can someone please tell me if you have implemented the scenario in JSP based component as HTL doesn't support Taglibs: Author the JSTL tags and process it. 

Currently the JSTL tags authored in printing as is and it is not processed. Please let me know.

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 MarkusBullaAdobe

Hi @test1234567!

 

While JSPs are still supported (as well as EcmaScript and JST) and it is totally possible to implement and use JSTL in this context I would not recommend to follow that path. 

HTL is the preferred and recommended server-side templating system for HTML in AEM. AEM Core Components are implemented with HTL and they can be seen as a best practice reference implementation. Personally, JSTL feels a bit outdated to me in the context of AEM. I haven't seen it in a project for quite some time and can't think of any advantages that it would have nowadays.

 

Also I'm not quite sure about the approach that you are outlining. When you talk about "authoring JSTL tags" , you probably mean that in terms of the development cycle, right? Because I would definitely avoid to allow JSTL usage (as well as anything else that might somehow "smell" like programming including JavaScript and HTML source code) for content editors. That's a discouraged practice and comes with a whole lot of other implications to your applications stability and security.

 

Hope that helps!

 

 

2 replies

MarkusBullaAdobe
Adobe Employee
MarkusBullaAdobeAdobe EmployeeAccepted solution
Adobe Employee
June 10, 2021

Hi @test1234567!

 

While JSPs are still supported (as well as EcmaScript and JST) and it is totally possible to implement and use JSTL in this context I would not recommend to follow that path. 

HTL is the preferred and recommended server-side templating system for HTML in AEM. AEM Core Components are implemented with HTL and they can be seen as a best practice reference implementation. Personally, JSTL feels a bit outdated to me in the context of AEM. I haven't seen it in a project for quite some time and can't think of any advantages that it would have nowadays.

 

Also I'm not quite sure about the approach that you are outlining. When you talk about "authoring JSTL tags" , you probably mean that in terms of the development cycle, right? Because I would definitely avoid to allow JSTL usage (as well as anything else that might somehow "smell" like programming including JavaScript and HTML source code) for content editors. That's a discouraged practice and comes with a whole lot of other implications to your applications stability and security.

 

Hope that helps!

 

 

Level 6
June 10, 2021
@markusbullaadobe - Thanks for your reply. Yes, I too agree that JSTLs are outdated but we have some utilities written in JSTL and it is still in use. In one of the component, we are providing the capability to the authors to author the JSTL tags from the dialog and that should be processed. The JSTL are not processed if we process it from the node properties. If I hardcode the same JSTL tags on the componeny, it is loading fine. Not sure how to handle this use case.
Shubham_borole
Community Advisor
Community Advisor
June 11, 2021

Hello,

I have seen scenarios where complex jstl logic in jsp and utilities used for taglibs need to be used for HTL conversion of the component. The conclusion for us at the end was to convert everything to HTL specifications and do some design changes if necessary. There have been changes in AEM implementations in these regards (HTL) and better to adhere to current standards. Regarding authoring capability of JSTL, that is something we should avoid I feel and change the input to a controlled level only for the authors. Not a solution I suppose to what was asked but the basic message is I think Do not do what you are looking to do 🙂 

 

Regards