내 커뮤니티 업적 표시줄을 확대합니다.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Converting Jsp to HTL

Avatar

Level 3

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

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee

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

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Employee

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

Avatar

Level 4

Avatar

Community Advisor

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