A
Albretch
Say you put the same JSP in
<%CATALINA_BASE%>/webapps/webappName/Dir00/
and
<%CATALINA_BASE%>/webapps/webappName/Dir99/
How could you make the JSP by itself tell apart 'Dir00' from 'Dir99'?
None of these work:
// __
String aPth = null;
File Fl;
try{ Fl = new File("."); aPth = Fl.getCanonicalPath(); }
catch(IOException IOXcptn) { IOXcptn.printStackTrace(); }
System.err.println(" new File(".").getCanonicalPath()=" + aPth);
// __
aPth = (new File(".")).getAbsolutePath();
System.err.println(" (new File(".")).getAbsolutePath=" + aPth);
Is there any work around?
<%CATALINA_BASE%>/webapps/webappName/Dir00/
and
<%CATALINA_BASE%>/webapps/webappName/Dir99/
How could you make the JSP by itself tell apart 'Dir00' from 'Dir99'?
None of these work:
// __
String aPth = null;
File Fl;
try{ Fl = new File("."); aPth = Fl.getCanonicalPath(); }
catch(IOException IOXcptn) { IOXcptn.printStackTrace(); }
System.err.println(" new File(".").getCanonicalPath()=" + aPth);
// __
aPth = (new File(".")).getAbsolutePath();
System.err.println(" (new File(".")).getAbsolutePath=" + aPth);
Is there any work around?