Guest User

Untitled

a guest
Apr 26th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. getUrlJsonObject({
  2. href:pathcamp+'sql/getFileNamesDocs.jsp',
  3. method:"GET",
  4. },
  5. function(data){
  6. console.log(data);
  7. });
  8.  
  9. <%@page import="java.io.*"%>
  10. <%
  11. File folder = new File("docs/");
  12. File[] listOfFiles = folder.listFiles();
  13. String [] listOfNames = new String[listOfFiles.length];
  14. for (int i = 0; i < listOfFiles.length; i++) {
  15. if (listOfFiles[i].isFile()) {
  16. listOfNames[i] = listOfFiles[i].getName();
  17. out.println(listOfNames[i]);
  18. }
  19. }
  20. %>
Add Comment
Please, Sign In to add comment