What is the best way to implement the Composite View Pattern for a Java website?
My idea was to take one jsp and include multiple pages like:
<h1>Layout Start</h1>
<%
Values values = DataHandler.getValues(request);
LayoutHelper layout = values.getLayout();
out.println("Layout.getContent(): " + layout.getContent());
%>
<jsp:include page="<%= layout.getContent() %>" flush="false" />
<h1>Layout End</h1>
But then all my small jsp files in the WEB-INF directory are still avalible to the user. How can i denine access to all jsp files but one for the template. And then I need a filter or Servlet to inserter the pathes in the Values object.