Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Approach to convert jsp code to htl in aem

srikanthg212933
Level 3
Level 3

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.

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

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

View solution in original post

2 Replies
Veena_Vikram
Community Advisor
Community Advisor

@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 ✌

Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

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

View solution in original post