Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getUrlJsonObject({
- href:pathcamp+'sql/getFileNamesDocs.jsp',
- method:"GET",
- },
- function(data){
- console.log(data);
- });
- <%@page import="java.io.*"%>
- <%
- File folder = new File("docs/");
- File[] listOfFiles = folder.listFiles();
- String [] listOfNames = new String[listOfFiles.length];
- for (int i = 0; i < listOfFiles.length; i++) {
- if (listOfFiles[i].isFile()) {
- listOfNames[i] = listOfFiles[i].getName();
- out.println(listOfNames[i]);
- }
- }
- %>
Add Comment
Please, Sign In to add comment