Last change
on this file since 29906 was 29906, checked in by davidb, 9 years ago |
Changes resulting from writing the TPDL submission
|
File size:
1.1 KB
|
Rev | Line | |
---|
[29600] | 1 | <%
|
---|
| 2 | String docBase = getServletContext().getRealPath("/");
|
---|
| 3 | File similarityDir = new File(docBase,"similarity-2d");
|
---|
| 4 |
|
---|
[29787] | 5 | String imagesStr = (request.getParameter("imagesDir")!=null) ? request.getParameter("imagesDir") : "import";
|
---|
| 6 | File imagesDir = new File(similarityDir,imagesStr);
|
---|
| 7 |
|
---|
[29906] | 8 | ArrayList<File> imageFileList = listFilesForFolderRE(imagesDir,".*\\.(gif|jpg|jpeg|png)$");
|
---|
[29600] | 9 |
|
---|
[29787] | 10 | File imageUrlBase = new File(imagesStr);
|
---|
[29600] | 11 |
|
---|
[29787] | 12 | //String action = request.getParameter("action");
|
---|
[29600] | 13 |
|
---|
| 14 | out.println("<script>");
|
---|
| 15 | out.println("var dynamic_img_list = [ ");
|
---|
| 16 | boolean first_entry = true;
|
---|
| 17 | for (final File fileEntry : imageFileList) {
|
---|
| 18 | String flagImageUrl = imageUrlBase + "/" + fileEntry.getName();
|
---|
| 19 |
|
---|
| 20 | if (first_entry) {
|
---|
| 21 | out.println("\"" + flagImageUrl + "\"");
|
---|
| 22 | first_entry = false;
|
---|
| 23 | }
|
---|
| 24 | else {
|
---|
| 25 | out.println(",\"" + flagImageUrl + "\"");
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
| 28 | out.println("];");
|
---|
| 29 |
|
---|
| 30 | out.println("is_jsp_active = true;");
|
---|
| 31 | out.println("img_list = dynamic_img_list;");
|
---|
| 32 |
|
---|
| 33 | out.println("</script>");
|
---|
[29621] | 34 |
|
---|
[29600] | 35 | %>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.