<%@page import="java.io.File" %> <%@page import="java.io.InputStream" %> <%@page import="java.util.Properties" %> <% String testpattern_uri = request.getRequestURI(); int testpattern_start = testpattern_uri.lastIndexOf("/")+1; int tertpattern_end = testpattern_uri.indexOf("?"); String testpattern_key = "test.pattern"; String testpattern_folder = "/resources"; String testpattern_image = testpattern_folder+"/UIMA.png"; try { InputStream stream = application.getResourceAsStream(testpattern_folder+"/image-map.properties"); Properties props = new Properties(); props.load(stream); String value = props.getProperty(testpattern_key); if(value != null) { value = value.trim(); if(value.length() > 0) { String fileName = value; if(!fileName.startsWith(File.pathSeparator)) { fileName = application.getRealPath(value); } File file = new File(fileName); if(file.exists()) { testpattern_image = value; } } } } catch(Exception e) { } %>
T
E
S
T
   
T
E
S
T