is there a concept like ASP Masterpages in JSP?
Regards.
A master page is a defined set of formatting that is applied to the sections of your document-style report. In a template, you can specify a master page that includes a header element, a footer element, and layout properties, such as orientation and borders.
A master page is an ASP.NET file with the extension . master (for example, MySite. master) with a predefined layout that can include static text, HTML elements, and server controls. The master page is identified by a special @ Master directive that replaces the @ Page directive that is used for ordinary .
What are master pages? Master pages are used to create consistency from page to page in a document. Master pages typicially contain page headers, footers, margin and column guides, and other elements that occur on multiple pages in your document.
You can use a Master Page to create a common page layout. For example, if you want all the pages in your website to share a three-column layout, you can create the layout once in a Master Page and apply the layout to multiple content pages. You also can use Master Pages to display common content in multiple pages.
I'm going to step out on a limb here, and say what you're looking for is JSP Templates
Doesn't work exactly the same way, but it actually looks a little more flexible than MasterPages (Allows you to define multiple areas of the templates to pull different content from).
In the Java world there are multiple solutions to this. My suggestion is to use whatever your framework suggests. For example Struts tiles, JSF Facelets e.t.c You do use a web framework, don't you?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With