Include Page Fragments (or other jsp files) from within the backing bean

Hi there,

I am developing a web application with Netbeans Visual Webpack. Until now that all worked fine for me but now I am at some point where I want to have a "master page" that provides me a header and a footer, so that I don't have to include these things everytime on every page (what makes the application difficult to maintain).

So what I have, is two page fragments (extra jsp pages). One for the header and one for the footer. These are now included on every page via a "jsp:directive.include".

I want to include them dynamically from within a super-class of the backing bean, but the problem is, that you can't access any of the contents of these fragments to set them as children of the body element (which would you do in a custom renderer or whatsoever).

I also already had a look on Facelets and Tiles but using any of these would require a whole change to the presentation layer and the unability of using the visual editor provided by Netbeans (which I hardly want to abandon).

So can anybody give me a solution for this problem? I'm stuck with this for several days now.

Thanks, Markus

[1150 byte] By [markus_luxa] at [2007-11-27 11:34:35]
# 1

See the subsection "Defining Implicit Includes" in section "Setting Properties for Groups of JSP Pages" in Chapter 4 of the JEE 5 Tutorial. I'm not sure if this interoperates with JSF, but it is worth taking a look at.

RaymondDeCampoa at 2007-7-29 16:58:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...