Converting Jsp to HTL | Community
Skip to main content
Nandhini_Marimu
Level 2
September 11, 2017
Solved

Converting Jsp to HTL

  • September 11, 2017
  • 3 replies
  • 4998 views

Hi,

I need to convert my jsp page to HTL(Sightly).

In Jsp we use ,

<jsp:useBean id="aa" scope="page"

class="com.aaa.bbb.cq.ccc.dd.MyJavaClass" />

<jsp:setProperty name="aa" property="slingRequest"

value="${slingRequest}" />

Where  it will call the java class named 'MyJavaClass' on page load.

In HTL(Sighlty) how we can implement this on page load,can anyone guide me ?

Thanks,

Nandhini

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 Feike_Visser1

You can use data-sly-use to use Java-classes.

3 replies

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
September 11, 2017

You can use data-sly-use to use Java-classes.

VeenaVikraman
Community Advisor
Community Advisor
September 11, 2017

You can create a model for your component and fetch the properties in the Sling Model if you need to manipulate with those.

A sample to help you Creating a site footer in AEM 6 using Sightly and Sling Models | 6D Labs