I'm doing a little website using Java EE and I'm experiencing a problem. In fact, I would like to have a main layout in which I would like to have the elements of my website which appear on each page. Something like that :
<html>
<head>
<title>Just a website...</title
</head>
<body>
<div id="page">
<div id="header"></div>
<div id="content">
<!-- Include content here -->
</div>
<div id="footer">
</div>
</body>
</html>
Then, when I go on a specific page, I would like that the content of that page would be include in the "content" bloc.
The problem is that I don't know what is the best way to do it. Do I have to create a main servlet and forward all requests from others servlets to that servlet and then handle the page that I have to include ?
I would be happy to find a tutoriel or something like that on the internet but I don't.