Last change
on this file since 29608 was 29608, checked in by davidb, 9 years ago |
Switch to using JESSIONID as part of the flagname, so everyone visiting the site gets to design their flag in private.
|
File size:
1.0 KB
|
Rev | Line | |
---|
[29600] | 1 | <%
|
---|
| 2 | String docBase = getServletContext().getRealPath("/");
|
---|
| 3 | File similarityDir = new File(docBase,"similarity-2d");
|
---|
| 4 | File imagesDir = new File(similarityDir,"Images");
|
---|
| 5 |
|
---|
| 6 | ArrayList<File> imageFileList = listFilesForFolder(imagesDir,".gif");
|
---|
| 7 |
|
---|
| 8 | File imageUrlBase = new File("Images");
|
---|
| 9 |
|
---|
| 10 | String action = request.getParameter("action");
|
---|
| 11 |
|
---|
| 12 | out.println("<script>");
|
---|
| 13 | out.println("var dynamic_img_list = [ ");
|
---|
| 14 | boolean first_entry = true;
|
---|
| 15 | for (final File fileEntry : imageFileList) {
|
---|
| 16 | String flagImageUrl = imageUrlBase + "/" + fileEntry.getName();
|
---|
| 17 |
|
---|
| 18 | //out.println("<img src=\"" + flagImageUrl + "\">");
|
---|
| 19 | if (first_entry) {
|
---|
| 20 | out.println("\"" + flagImageUrl + "\"");
|
---|
| 21 | first_entry = false;
|
---|
| 22 | }
|
---|
| 23 | else {
|
---|
| 24 | out.println(",\"" + flagImageUrl + "\"");
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 | out.println("];");
|
---|
| 28 |
|
---|
| 29 | out.println("is_jsp_active = true;");
|
---|
| 30 | out.println("img_list = dynamic_img_list;");
|
---|
| 31 |
|
---|
| 32 | out.println("</script>");
|
---|
[29608] | 33 |
|
---|
[29600] | 34 | %>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.