Lines 477-482
Link Here
|
477 |
|
477 |
|
478 |
|
478 |
|
479 |
/** |
479 |
/** |
|
|
480 |
* Given an application name, get the context path |
481 |
*/ |
482 |
protected String getContextPath(String appName) { |
483 |
String contextPath = null; |
484 |
if (appName.equals("")) { |
485 |
contextPath = "/"; |
486 |
} else { |
487 |
contextPath = appName.replace('#', '/'); |
488 |
} |
489 |
return (contextPath); |
490 |
} |
491 |
|
492 |
|
493 |
|
494 |
/** |
480 |
* Deploy applications for any directories or WAR files that are found |
495 |
* Deploy applications for any directories or WAR files that are found |
481 |
* in our "application root" directory. |
496 |
* in our "application root" directory. |
482 |
*/ |
497 |
*/ |
Lines 504-522
Link Here
|
504 |
File configBase = configBase(); |
519 |
File configBase = configBase(); |
505 |
String baseName = getConfigFile(name); |
520 |
String baseName = getConfigFile(name); |
506 |
String docBase = getConfigFile(name); |
521 |
String docBase = getConfigFile(name); |
|
|
522 |
String contextPath = getContextPath(name); |
507 |
|
523 |
|
508 |
// Deploy XML descriptors from configBase |
524 |
// Deploy XML descriptors from configBase |
509 |
File xml = new File(configBase, baseName + ".xml"); |
525 |
File xml = new File(configBase, baseName + ".xml"); |
510 |
if (xml.exists()) |
526 |
if (xml.exists()) |
511 |
deployDescriptor(name, xml, baseName + ".xml"); |
527 |
deployDescriptor(contextPath, xml, baseName + ".xml"); |
512 |
// Deploy WARs, and loop if additional descriptors are found |
528 |
// Deploy WARs, and loop if additional descriptors are found |
513 |
File war = new File(appBase, docBase + ".war"); |
529 |
File war = new File(appBase, docBase + ".war"); |
514 |
if (war.exists()) |
530 |
if (war.exists()) |
515 |
deployWAR(name, war, docBase + ".war"); |
531 |
deployWAR( contextPath, war, docBase + ".war"); |
516 |
// Deploy expanded folders |
532 |
// Deploy expanded folders |
517 |
File dir = new File(appBase, docBase); |
533 |
File dir = new File(appBase, docBase); |
518 |
if (dir.exists()) |
534 |
if (dir.exists()) |
519 |
deployDirectory(name, dir, docBase); |
535 |
deployDirectory(contextPath, dir, docBase); |
520 |
|
536 |
|
521 |
} |
537 |
} |
522 |
|
538 |
|
Lines 699-705
Link Here
|
699 |
if (files[i].toLowerCase().endsWith(".war")) { |
715 |
if (files[i].toLowerCase().endsWith(".war")) { |
700 |
|
716 |
|
701 |
// Calculate the context path and make sure it is unique |
717 |
// Calculate the context path and make sure it is unique |
702 |
String contextPath = "/" + files[i]; |
718 |
String contextPath = "/" + files[i].replace( '#', '/' ); |
703 |
int period = contextPath.lastIndexOf("."); |
719 |
int period = contextPath.lastIndexOf("."); |
704 |
if (period >= 0) |
720 |
if (period >= 0) |
705 |
contextPath = contextPath.substring(0, period); |
721 |
contextPath = contextPath.substring(0, period); |