Recompilation of jsp

2012-03-07 Thread Markus Joschko
Hi,
when and how are jsps recompiled by sling?

I have a jsp which is using a jsp include to include another jsp(fragment).

%@include file=../../common/header.jsp%

When I update the bundle with an updated header fragment, the jsp that
includes that fragment is not recompiled.
A server restart also doesn't help. Anyway to get the updated header
displayed without touching all jsps that include that?

Thanks,
 Markus


Re: sling.include-ing another page

2012-03-07 Thread Alexander Klimetschek
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