この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
Hi,
Is there any way to retrieve the HTML contents of a cq:Page without using external jars/bundles.???
解決済! 解決策の投稿を見る。
See if request processor can help you achieve this.
Sample Snippet would be
Hi,
can you explain more what you are trying to do here ?
/Johan
表示
返信
いいね!の合計
See if request processor can help you achieve this.
Sample Snippet would be
gnishant wrote...
See if request processor can help you achieve this.
Sample Snippet would be
- SlingRequestProcessor requestProcessor = sling.getService(SlingRequestProcessor.class);
- RequestResponseFactory requestResponseFactory = sling.getService(RequestResponseFactory.class);
- HttpServletRequest request = requestResponseFactory.createRequest("GET", "/content/geometrixx-media/en/mycustompage.html");
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- HttpServletResponse response = requestResponseFactory.createResponse(out);
- requestProcessor.processRequest(request, response, resourceResolver);
- html = new String(out.toByteArray(), "UTF-8");
Thnaks a lot for the snipet.
Hi,
I have a cq:Page i just need to get the HTML format of that page in a string.
Say /content/geometrixx/en.html I need to get the value of the html in a string.
I dont want to use" URL url = new URL(url for the page);" or any other methods which basically returns the html of the "url" sent.
Does cq provide any api's or methods which does the same.
表示
返信
いいね!の合計
What you planning to do with retrieved html content? Send an email OR embed in other page OR store in local file etc.. Explain the exact use case.
表示
返信
いいね!の合計
Hi,
I have similar requirement like pulling complete page details and adding same into email with same format (including images and RTE content).
Could you please let me know how this can be done ?
Thanks,
Hari
表示
返信
いいね!の合計
Hi Sham,
I am trying to send the html contents through mail.
表示
返信
いいね!の合計
Please do not attach new questions on old threads. Start a new question. You will increase your chances of getting a response.
表示
返信
いいね!の合計