Approach to convert jsp code to htl in aem | Community
Skip to main content
Level 3
September 10, 2020
Solved

Approach to convert jsp code to htl in aem

  • September 10, 2020
  • 2 replies
  • 2056 views

Hi 

I have a usecase where currently we have two components with below code structure dependency

 

componenta

  •      show.jsp
  • sling:resourcesupertype : componentb

Componentb

  • init.jsp
  • componentb.jsp -----> inside this show.jsp is called.
  • show.jsp

So currently I wanted to convert componenta show.jsp to html(htl) with model class without effecting supertype componentb(because this component is used in multiple places dint want to disturb this). How this can be achieved i mean how can make sure my html is loaded once the request comes to show.jsp in componenta. any references would be helpful.

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 arunpatidar

Hi,

I think, you can do it without any issue.

Convert componentA into HTL(HTML+Model)

Include ComlponnetA into ComponentB using cq:include or sling:include

2 replies

VeenaVikraman
Community Advisor
Community Advisor
September 10, 2020

@srikanthg212933 My genuine opinion is not to mix up HTL and JSP. You might be able to do it, but I don't think it is the best way to do it. 

 

Thanks

Veena ✌

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
September 13, 2020

Hi,

I think, you can do it without any issue.

Convert componentA into HTL(HTML+Model)

Include ComlponnetA into ComponentB using cq:include or sling:include

Arun Patidar