Skip to main content
Question

Tomcat\\webapps\\inhouse\\ folder

  • May 8, 2015
  • 3 replies
  • 12 views

Forum|alt.badge.img+21

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

Forum|alt.badge.img+3
  • New Contributor
  • June 3, 2015

trying to do the something / not working


Forum|alt.badge.img+12
  • Contributor
  • June 3, 2015

I'm sure you /could/..


Forum|alt.badge.img+21
  • Author
  • Valued Contributor
  • June 3, 2015

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;
}
%>