On 06.03.2012, at 00:59, David G. wrote:
> Is it possible to sling.include another page in a JSP?
Yes.
(Though I guess with "page" you refer to a CQ proprietary concept, you might
want to discuss that on a CQ list).
> I am making a custom set of error jsp's and I want to include the html
> representation a content page in the 404 response (rather than 302 to the
> page).
>
> I've played around with sling.include passing the Page resource, the Page's
> PageContent resource, explicit string paths to the page (including .html
> ext), etc. but nothing the actual page itself is never shown.
Maybe the user cannot read the page?
> Also, to note, sling.include("/content/site/errors/404") keeps the 404,
> whereas sling.include("/content/site/errors/404.html") magically turns the
> response into a 200 (even though the contents of the page is not rendered).
The resulting page might set a different response code - and you might want to
use a forward instead of an include here.
Cheers,
Alex
--
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel