20) Create Relative and Absolute Paths. |
Relative paths in Xload are paths that are relative to the web application root folder whereas absolute paths are absolute to the machine and are machine dependant.
Relative Paths:
Web application directory - c:\WebApp (Windows™)
Resource folder within that web application - c:\WebApp\Folders\ResourceFolder (Windows™)
Relative path to resource folder used in Xload would be - Folders/ResourceFolder (notice the forward slash and not backward)
(You CAN specify an empty relative path which will target the web application root)
IMPORTANT:- Note that no matter what platform Xload was working on the relative path would be the same. |
Absolute Paths:
An absolute path is machine specific and depends upon the platform Xload is working on. The following examples show this:
C:\WebApp\Folders\ResourceFolder (Windows™)
/WebApp/Folders/ResourceFolder (Linux/Unix/OS X)
(Obviously a File.separatorChar could be used to separate directory names for cross-platform support)
IMPORTANT:- If Xload is being used without a HttpServletRequest object (i.e. not specified in the XloadManager constructor) then all paths MUST be absolute. |
© Gubutech(Xload) 2006 (v1.2)