You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Johannes Fiala <to...@fwd.at> on 2003/05/01 16:00:20 UTC
Fw: Guidance in changing StandardHostDeployer.java needed - extended
Hi there,
Basic problem: I want to be able to have a pseudo-context, which is able
to point to other Contexts to perform a runtime-versioning of an
application. This should suffice to reach the target of high availability
of an app without any downtime experiences for the end users.
Diagnosis:
It seems it would be a good thing to have a normal context and set the
docBase in context.xml during deployment using ant.
Am I right here? Does this raise security issues?
Suggested solution:
allow a new parameter in context.xml:
<Context ...
overridedocBase="true" />
overridedocBase=true => will set the docBase dynamically computed while
deploying the WAR file.
overridedocBase=false => will set the docBase as specificied in
context.xml (will leave it unchanged)
Needed changes:
line 297:
Context context = (Context) clazz.newInstance();
*) how could I access the new attribute overridedocBase? Is there an easy
way/would a new attribut get exposed automatically? Or can I parse
context.xml before installing the new war file easily?
line 299 + 377:
if (overridedocBase.equals("true")) {
// use the dynamically computed docBase
} else {
// do not override, use docBase attribute of context.xml
}
this would be the minimal-impact addition to the java-File.
What this make sense? If yes, I'll look at the TC 5.x source to suggest
the changes required there.
Johannes