この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
Hello Guys,
I have a JSP where all my util methods are written(can't use Java class), I included the JSP in my html(sightly file) and failed trying to invoke the methods. I can only use JavaScript use API. Any suggestions?
Thanks,
AG
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
Hi,
Those documents explain how to use JS API instead Java or JSP.
But you can't call JSP methods from HTL or JS API but you can convert JSP code into Java or JS and use inside HTL.
表示
返信
いいね!の合計
No, in HTL you can only access model classes (SlingModels or WcmUse classes), but you cannot invoke methods from JSPs. And btw this really pollutes your application design and makes testing unnecessary hard.
Jörg
表示
返信
いいね!の合計
You can't use JSP method in HTL file.
But you can use JavaScript use API, any specific issue with it?
表示
返信
いいね!の合計
Hi edubey,
Please share the syntax or example how I can call using JavaScript use API. I tried but not getting the output.
Thanks.
表示
返信
いいね!の合計
Hi Arun,
I gone through all those documentations, nothing helped. None of them has an example of invoking jsp methods in HTL or JavaScript use API.
表示
返信
いいね!の合計
Here is an artilce that talks about how to use the JS API for HTL -- Creating a Tab layout component for Adobe Experience Manager
NOTE - you cannot use JSP with HTL as ppl on this thread mentioned. You can use JS with HTL - not JSP. The best way is to implement your methods in Java or use Sling Models.
表示
返信
いいね!の合計