Skip to content

Instantly share code, notes, and snippets.

@searls
Created June 13, 2011 22:25
Show Gist options
  • Save searls/1023881 to your computer and use it in GitHub Desktop.
Save searls/1023881 to your computer and use it in GitHub Desktop.
Renders a jsp:include action for each of the files immediately in some directory (Goodness hope you never have reason to do this, but I needed something like this for a very tricky dev-environment)
<%@page import="java.io.File" %>
<%
String templates = "/path/to/folder/of/stuff";
for(File f : new File(application.getRealPath(templates)).listFiles()) {
String path = templates+"/"+f.getName();
%><jsp:include page="<%= path %>" /><%
}
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment