Alex, It turned out i did something silly and wasn't including my scripts for extending the sling error handler servlet correctly, which was causing old versions of JSPs to be used.
I am setting the slingResponse statusCode now and performing a sling.include and the appropriate error codes are persisting. Thanks for the affirmation though, it helped me look in the right spot for the issue. -- David Gonzalez Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Wednesday, March 7, 2012 at 1:05 PM, Alexander Klimetschek wrote: > 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 > >
