Created
June 13, 2011 22:25
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@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