Issues with resolving taglibs in JSP based component | Community
Skip to main content
Level 6
June 4, 2021
Solved

Issues with resolving taglibs in JSP based component

  • June 4, 2021
  • 1 reply
  • 2299 views

Hello Community - Since my previous request was marked as resolved so I am opening this to get an assistance here. Please note that I am using JSP based component not HTL. This is a very simple component which takes the taglib from the dialog and inject the respective tags for the provided taglib. If I simply hardcoded the taglib directly in the component it works fine and I could see the expected results but it doesn't work when I provide the taglib via dialog. Not sure what is causing the issue. Any help on this is highly appreciated.

component.jsp:

<%@include file="/libs/foundation/global.jsp" %>
<%@page import="com.day.cq.wcm.api.WCMMode"%>
<%@ taglib uri="http://company.com/clientLib-taglib" prefix="evaltag" %>

<% if((WCMMode.fromRequest(request) != WCMMode.DISABLED)) { %>
Taglib Component
<%} %>

${properties.openhtml}


This is what I author from the dialog:

<evaltag:includeClientLibs async="true" defer="false" js="clientlib" verName="${projectVersion}" />

 

@BrianKasingli @Vijayalakshmi_S

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 Vijayalakshmi_S

Hi @test1234567,

Can you try like the below. If it is not working, share your complete JSP if possible. Also share the node structure of how this particular field is saved (property value from respective node)

<%
String openHtml = properties.get("openhtml", ""); // provided openhtml dialog field/content authored is saved as String
%>
<%= openHtml %>

1 reply

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
June 7, 2021

Hi @test1234567,

Can you try like the below. If it is not working, share your complete JSP if possible. Also share the node structure of how this particular field is saved (property value from respective node)

<%
String openHtml = properties.get("openhtml", ""); // provided openhtml dialog field/content authored is saved as String
%>
<%= openHtml %>

Level 6
June 7, 2021
@vijayalakshmi_s - Thanks for your reply. I have tried with the below but the tags are still not resolving and the author taglibs are present as is. PFB. <%@include file="/libs/foundation/global.jsp" %> <%@page import="com.day.cq.wcm.api.WCMMode"%> <%@ taglib uri="http://company.com/clientLib-taglib" prefix="evaltag" %> <% if((WCMMode.fromRequest(request) != WCMMode.DISABLED)) { %> Taglibs <%} %> <% String openHtml = properties.get("openhtml", ""); %> <%= openHtml %>