Master page in JSP files
asp.net, java, jsp, master-pages
Solution
check this link: http://code.google.com/p/jsp-decorator/
You can have a decorator - the master - for the pages that you want.
I use an `xml` to define which page has which decorator, something like:
<decorator name="name" page="decorator.jsp">
<pattern>/folderName/*</pattern>
<pattern>/folerName2/*</pattern>
</decorator>
See the answers to this question: Is it possible to define a decorator directly in a JSP with Sitemesh?
Problem
I am new to JSP. When I used to work with ASPX I created a project with a master page, the `<body>` of the master page was like this: ``` <body> <asp:ContentPlaceHolder ID="MainContent" runat="server"> </asp:ContentPlaceHolder> </body> ``` and every ASPX file except the master had in the beginning `MasterPageFile="~/Site.master"` for example ``` <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> ``` and wrote only in `MainContent` like this: ``` <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent"> code ... </asp:Content> ``` Now I want to create same idea in JSP. How can I define the master and how I can define that the other JSP will be under the control of the master`?