View | Details | Raw Unified | Return to bug 35054
Collapse All | Expand All

(-)HostConfig.java.orig (-2 / +22 lines)
Lines 384-397 Link Here
384
        }
384
        }
385
385
386
        File file = new File(host.getAppBase());
386
        File file = new File(host.getAppBase());
387
        if (!file.isAbsolute())
387
        boolean makeRelative = false;
388
        if (!file.isAbsolute()) {
389
            makeRelative = true;
388
            file = new File(System.getProperty("catalina.base"),
390
            file = new File(System.getProperty("catalina.base"),
389
                            host.getAppBase());
391
                            host.getAppBase());}
390
        try {
392
        try {
391
            appBase = file.getCanonicalFile();
393
            appBase = file.getCanonicalFile();
392
        } catch (IOException e) {
394
        } catch (IOException e) {
393
            appBase = file;
395
            appBase = file;
394
        }
396
        }
397
        if (log.isInfoEnabled()) {
398
            if (!appBase.exists()) {
399
                String extraInfo = "";
400
                if (makeRelative) {
401
                    extraInfo = " neither absolute, nor in \"" +file.getAbsolutePath() + "\"";
402
                }
403
                log.info("no app-base of host \"" + host.getName() + 
404
                		"\" exists for declared \""
405
                        + host.getAppBase() + "\"" +extraInfo
406
                        		);
407
            } else {
408
            if (!appBase.isDirectory()) {
409
                log.info("app-base for host \"" + host.getName() + 
410
                		"\" must be a directory \""
411
                        + host.getAppBase() + "\"; WAR files go into the \"Context\"'s \"docBase\" atrribute.");
412
                //see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Attributes
413
            }}
414
        } 
395
        return (appBase);
415
        return (appBase);
396
416
397
    }
417
    }

Return to bug 35054