Adobe CQ - 从.jsp节点获取HTML内容 [英] Adobe CQ - fetch HTML content from .jsp node

查看:208
本文介绍了Adobe CQ - 从.jsp节点获取HTML内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

/ components

.jsp 文件>路径如下所示:
http:// localhost:4502 / apps / project-name / components / my-component / one.jsp

有没有可能通过url获得 HTML 这个 one.jsp 的内容内容节点?

Is it possible get HTML content of this one.jsp by url without creating content node?

类似于:

http://localhost:4502/apps/project-name/components/my-component/one.HTML

.html 内容是进一步呈现所必需的。

the .html content is needed for further rendering.

推荐答案

据我所知,通过提供jsp文件的路径,你无法直接从JSP获取html内容。它将在JSP中按原样显示内容而无需编译。

As far as i know, you cannot get the html content from the JSP directly by providing the path to the jsp file. It displays the content in the JSP as is without compiling.

一种可能的方法是创建一个nt:unstructured节点,并将sling:resourceType属性设置为jsp(如下所示)

$ p $ test:{
sling:resourceType:/ apps / geometrixx / components / title /one.jsp,
jcr:primaryType:nt:unstructured
}

One possible way is to create an nt:unstructured node with the sling:resourceType property set to the path of the jsp (something like below)



test: { sling:resourceType: "/apps/geometrixx/components/title/one.jsp", jcr:primaryType: "nt:unstructured" }

And you can provide the path to the test node to get the html rendered by the jsp.

您可以提供测试节点的路径来获取由jsp呈现的html。 / components / title / test

/apps/geometrixx/components/title/test

这篇关于Adobe CQ - 从.jsp节点获取HTML内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆