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 available to the user. How can I deny access to all .jsp files except for the one template.
After that I need a filter or Servlet to insert the paths in the Values object.
Update
I don't mean that the WEB-INF is accessible from the file system (Or Webserver) but from the web app through the controller with my current layout layout.getcontent()
maps to an URL parameter/user input.
What are the common used frameworks to handle the Composite View Pattern??