Tomcat\webapps\inhouse\ folder

Emmert
Valued Contributor

Has anyone tried running custom dynamic pages out of here?

I'm thinking I probably shouldn't, but since it's there, I'm tempted to try.

3 REPLIES 3

callen
New Contributor

trying to do the something / not working

Simmo
Contributor II
Contributor II

I'm sure you /could/..

Emmert
Valued Contributor

I finished this and it's working nicely, actually. I wrote a little JSP page that lists out all of the files in the inhouse subfolders. Here's the method:

<%!
public String listFiles(String folder) {
String root="C:/Program Files/JSS/Tomcat/webapps/inhouse/" + folder + "/";
java.io.File file;
java.io.File dir = new java.io.File(root);
String[] list = dir.list();
String output = "";
for (int i = 0; i < list.length; i++) {
file = new java.io.File(root + list[i]);
if (!list[i].equals(".DS_Store")) {
output += "<li><a href="./";
output += folder + "/" + list[i];
output += "">";
output += list[i];
output += "</a><br />
";
}
}
return output;
}
%>